The Daily Click ::. Forums ::. Klik Coding Help ::. 360360360
 

Post Reply  Post Oekaki 
 

Posted By Message

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
19th April, 2005 at 12:45:06 -

this is quite embarassing, i've never used a 360 degree movement.
And none of the many examples/articles i've followed, has worked
Maybe it's me, or my machine, or my MMF 1.5, but i can't get anything 360 degree related to work . I'd need a 360 degree racing movement (not too complicated, just the standard stuff, i can do sliding and stuff myself when i've learned the basics) and 360 degree shooting.
PLEASE HELP!

 
n/a

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
19th April, 2005 at 21:14:39 -

360 is quite simple, even if you don't understand the maths involved. Create a counter or some sort of value (alterable, global, etc.). This counter is the object's angle.


Repeat while right is pressed: Add 2 to counter
Repeat while left is pressed: Subtract 2 from counter

Repeat while forward is pressed: Set active1.x to (active1.x * cos(counter) * [speed])
: Set active1.y to (active1.y * sin(counter) * [speed])


Where it says [speed] insert a value. I recomend 10,50, or 100 depending on the speed of your car.


Image Edited by the Author.

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

-Vinny-



Registered
  12/01/2005
Points
  436
20th April, 2005 at 01:02:22 -

and there you go, it may not completely suit your game's personal needs, but it's more or less complete, and if you know your math well, you can actually understand what's going on in the equations, and make up the rest of the 360 degree possibilities of MMF, and even make your own 360 degree shooting engine without asking

but ... people will be here to help if you do get stuck, so what i'm saying is, try things out first, and if you can't get it right, take up some tuts, and then finally ask for help

 
Vinny

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
20th April, 2005 at 03:49:07 -

i've already tried messing around with it, and all i've come to is to make it disappear in the start of the frame

I'll try it out Andy...

 
n/a

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
20th April, 2005 at 08:57:59 -

it doesn't work
when i go forward it just disappears

have a look at it if you want:
http://www.sitesled.com/members/aggesgams/360%20test.cca

 
n/a

AsparagusTrevor

Mine's a pint of the black stuff

Registered
  20/08/2002
Points
  2364

Game of the Week WinnerHas Donated, Thank You!VIP MemberEvil kliker
20th April, 2005 at 09:09:01 -

You need to include the image for the Active Picture Object. But maybe using the ALpha Channel object might be a better idea because the picture can be internal and have multiple animations.

 
Image

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
20th April, 2005 at 19:20:46 -

Woopsie, my bad. The reason it is dissapearing is because it is moving so fast. I accidently wrote multiply, instead of plus.

Repeat while forward is pressed: Set active1.x to (active1.x + cos(counter) * 10)

: Set active1.y to (active1.y + sin(counter) * 10)

That will work. However you may find that the object moves in the wrong direction, this is because the active picture may use a differant starting angle. For example, 0 degrees may be right. Or 0 degrees may be straight up. To fix that problem just add 90 degrees or something to the counter.

Set active1.x to (active1.x + cos(counter + 90) * 10)


 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
21st April, 2005 at 07:16:45 -

yay! thx! it works fine now

 
n/a

a1018



Registered
  08/02/2005
Points
  131
21st April, 2005 at 11:23:45 -

if you need that. I AM EXPERT ON 360 degree...
can look at my downs & see...
if you want more further wait for a while...

 

   

Post Reply



 



Advertisement

Worth A Click