The Daily Click ::. Forums ::. Klik Coding Help ::. 360 degree movement
 

Post Reply  Post Oekaki 
 

Posted By Message

Corsair



Registered
  26/06/2004
Points
  16
29th June, 2004 at 23:25:10 -

Hey, I'm new here and have recently acquired a copy of Multi Media Fusion 1.5. After running through some basic tutorials and such, I'm very interested in starting up my own game. I'd really like to have a 360 degree field of movement and shooting from birds eye view. I installed the bonus pack and after lookign around, there were references to advanced direction object and taht it could be used for what I need. However, I'm not sure exactly how it works. Any help would be great.

Thanks in advanced.

 
Don't knock on death's door- ring the doorbell and run away. He hates that.

Cybermaze



Registered
  03/04/2003
Points
  853
30th June, 2004 at 05:43:17 -

Chris Branch has written an article about it. Take a look here:
http://www.create-games.com/article.asp?id=1322

 
If you knew, I would have to kill you...

Corsair



Registered
  26/06/2004
Points
  16
30th June, 2004 at 10:17:13 -

Thanx for the input, but I've previously seen the article and it doesn't exactly cover what I'm tryign to do. I simply want to have a completely keyboard controlled 360 movement system. (pressing left rotates left, right right, pressing up moves forwad etc) pretty much teh exact same as teh racecar controls, but with only moving while the key is pressed down. Maybe the solution is obvious and im just missing it - again, any help would be great.

 
Don't knock on death's door- ring the doorbell and run away. He hates that.

ChrisB

Crazy?

Registered
  16/08/2002
Points
  5457
30th June, 2004 at 12:03:39 -

It's not too hard to get 360 race car movement, you just need these events:

• Start of Frame
(Player) : Set Value A to 0.0
(Player) : Set Value B to 0.0
(Player) : Set Value C to X( "Player" ) + 0.0
(Player) : Set Value D to Y( "Player" ) + 0.0

• Repeat while 'Left' is pressed
(Player) : Sub 5 to Value A

• Repeat while 'Right' is pressed
(Player) : Add 5 to Value A

• Repeat while 'Up' is pressed
(Player) : Add 0.1 to Value B

• Repeat while 'Down' is pressed
(Player) : Sub 0.1 to Value B

• Always
(Player) : Add Sin( Value A( "Player" ) ) * Value B( "Player" ) to Value C
(Player) : Sub Cos( Value A( "Player" ) ) * Value B( "Player" ) to Value D
(Player) : Set X Position to Value C( "Player" )
(Player) : Set Y Position to Value D( "Player" )


In your case, set Value B (speed) to 4 while Up is pressed, and set it to 0 while it's not pressed.

 
n/a

Corsair



Registered
  26/06/2004
Points
  16
30th June, 2004 at 22:12:53 -

Awesome- that works quite nicely. Just one more question= how do i match the objects direction with its movement? I have 32 directions for the object set up in its properties and i can get it to rotatewith conventional controls. I'm just curious as to how exactly i relate the alterable values to the directional value.

Thanx again for the help.

Image Edited by the Author.

 
Don't knock on death's door- ring the doorbell and run away. He hates that.

Corsair



Registered
  26/06/2004
Points
  16
3rd July, 2004 at 15:49:45 -

? Hmmm... post got knocked way down the ladder. Still looking for a little bit of help, thanx.

 
Don't knock on death's door- ring the doorbell and run away. He hates that.

Knudde (Shab)

Administrator
Crazy?

Registered
  31/01/2003
Points
  5125

Has Donated, Thank You!Clickzine StaffKlikCast StarVIP MemberGhostbuster!Dos Rules!I donated an open source project
3rd July, 2004 at 15:52:11 -

every 11.25 degrees is where your 32 directions are located. You might just usean active picture object, I believe that they allow 360 rotation.

 
Craps, I'm an old man!

Corsair



Registered
  26/06/2004
Points
  16
4th July, 2004 at 01:07:05 -

I was off by .25..... heh, tahts always fun.

Thanx for the help.

 
Don't knock on death's door- ring the doorbell and run away. He hates that.

ChrisB

Crazy?

Registered
  16/08/2002
Points
  5457
4th July, 2004 at 10:10:49 -

Shab, the AMAZING and WONDERFUL Alpha Channel object can also rotate in 360 degrees, and lets you specify fractions of a degree! I also have stocks in it, HAR HAR HAR

 
n/a

ChrisB

Crazy?

Registered
  16/08/2002
Points
  5457
4th July, 2004 at 15:39:28 -

THEY CAN'T BAN ME! I HAVE STOCKS IN TDC! HAR HAR HAR!

...okay, I'll stop the NationalLiberal impressions

 
n/a
   

Post Reply



 



Advertisement

Worth A Click