The Daily Click ::. Forums ::. Klik Coding Help ::. Trouble with projectiles
 

Post Reply  Post Oekaki 
 

Posted By Message

aphant



Registered
  18/05/2008
Points
  1242
27th May, 2008 at 22:19:46 -

Basically any projectile created will go in the designated direction until the source (in this case a fireball and it's caster) change direction, after which every projectile object of that type (all 'living' fireballs, for example) will suddenly change to match that direction. So one could be shot heading to the right, but if the caster turns to the left, the fireball will change direction too. I can't really think of how to fix this.

 

-MacAdaM-

Megaman Fosho

Registered
  12/02/2008
Points
  560
27th May, 2008 at 22:29:20 -

+User Pressed Fire 1 (or whatever casts fireball)
+"Fireball" value A equal to 0
----Set "Fireball"'s direction to direction of player
----Set value A "Fireball" to 1

This should work, but you might need to change somethings to match your own code.

Hope this helped

Image Edited by the Author.

 
Your just jealous that you're not as awesome as me.
(And my megaman avatar )

aphant



Registered
  18/05/2008
Points
  1242
27th May, 2008 at 23:36:13 -

It works! With how simple it is I almost feel silly for having trouble with it.

Thanks!

 

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
28th May, 2008 at 10:15:56 -

I cant imagine how you would get that problem in the first place.

 
.

aphant



Registered
  18/05/2008
Points
  1242
28th May, 2008 at 10:29:23 -

Instead of using the fireball's own alterable value for determining direction, I was using the caster's alterable value. It makes sense until you actually think about it.

 

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
28th May, 2008 at 11:18:11 -

oh i see now.

 
.
   

Post Reply



 



Advertisement

Worth A Click