The Daily Click ::. Forums ::. Klik Coding Help ::. 360 Degree movement combined + fastloop (instant hit bullets) to >-=TGF=-<... but HOW?
 

Post Reply  Post Oekaki 
 

Posted By Message

J.A.P

Possibly Insane

Registered
  11/06/2004
Points
  2048
6th July, 2004 at 07:50:37 -

I have just started to make "Krazyman Horde 3" ( you heard right ) with whole new look and engine, BUT I've stuck into a one BIG problem: how the hell I should make a 360 Degree movement to player and instant hitting bullets?

I've thinking the game would include these features too:

-the camera would follow in between the player pos and crosshair pos

-the direction of player looks always (but doesn't move) towards crosshair (in 360 degree engine)

So... I ask now: how do I make these features? Please send here tutorials and/or code to save my life!

 
Beware, be alert, prepare to defend yourself, or just run for your lives(!), because
JarmoNator has entered the building... (see avatar)
that dark human beast is almost unstoppable, invincible and totally gone CRAZY!

ChrisB

Crazy?

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

Instant hit bullets for TGF:

http://sfgames.clicksplat.com/cgi-bin/download.cgi?examples/tgf&InstantHitBullet.zip


And a 360 degree movement engine (race car, but you can change it easily)

http://sfgames.clicksplat.com/cgi-bin/download.cgi?examples/tgf&360DegreeRacing.zip

 
n/a

J.A.P

Possibly Insane

Registered
  11/06/2004
Points
  2048
6th July, 2004 at 11:40:22 -

I meant COMBINED 360 degr. movement and Instant hit bullets, but I'll look at the samples!

 
Beware, be alert, prepare to defend yourself, or just run for your lives(!), because
JarmoNator has entered the building... (see avatar)
that dark human beast is almost unstoppable, invincible and totally gone CRAZY!

J.A.P

Possibly Insane

Registered
  11/06/2004
Points
  2048
6th July, 2004 at 11:54:14 -

Excellent tuts, but one question: Is there any possibility to change the "360- degree thingy" direction depending from the mouse? (Player looks crosshair/mouse and degree value changes) It would be quite nifty...

you know, I'm not so good at Advanced Maths plugin and stuff

 
Beware, be alert, prepare to defend yourself, or just run for your lives(!), because
JarmoNator has entered the building... (see avatar)
that dark human beast is almost unstoppable, invincible and totally gone CRAZY!

ChrisB

Crazy?

Registered
  16/08/2002
Points
  5457
6th July, 2004 at 13:22:38 -

I believe there's a 'Get direction from fixed object to X/Y' expression - set the fixed object to your player, and use XMouse and YMouse for the X/Y values.

 
n/a

Arf :: FPP Games



Registered
  15/05/2002
Points
  1364
6th July, 2004 at 13:32:50 -

You can even do it without the advanced math object:

Angle = ATan( ( Y("Object") - YMouse ) / ( X("Object") - XMouse ) ) * 360 / 3.141592654

Although there's not much point if you're already using AMath.

 
n/a

ChrisB

Crazy?

Registered
  16/08/2002
Points
  5457
6th July, 2004 at 17:31:35 -

That method can also cause divide by zero errors, so be careful.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click