Projectile Question

DessekDessek Member Posts: 14

Hey all! I have a question about projectiles. I have a boss that I'm working on that has two damaging abilities. One is a beam that tracks the player and shoots at their location (I have this working perfectly), the other is a projectile I want to spawn from the boss and then have it run along the ground toward the player. How would I set that up?

I've been playing with accelerate behaviors but I can't get it worked out to where it shoots towards the players position (like my beam does) but immediately falls to the ground and moves along the ground toward the player. Like a bowling ball essentially? haha They're both set on timers. Any help would be appreciated. Thanks!

Answers

  • ookami007ookami007 Member Posts: 581

    I would give it an accerlerate at 270 degrees (down) of about 1000, and a motion.linearvelocity.x of whatever speed you want it to go at (negative that if the player is to the left of the boss). Give it collision with your ground as well.

  • ookami007ookami007 Member Posts: 581

    Here's a quick template I put together that creates a ground based missile that heads to the player, no matter which side he is on.

    When you click on the boss (blue guy), it spawns the missile in the air, it drops to the ground and then heads towards to player at whatever speed it is set to go at. When it hits the player, the player "dies" and respawns so you can kill him again!

    Hopefully that's what you're looking for.

    You can get the template here:

    https://dropbox.com/s/zyahn3nxhe45j15/Ground%20Based%20Missile%20Template.zip?dl=0

Sign In or Register to comment.