Jump to content

Recommended Posts

It should easily be possible, even without changing the stategraph. The only question is: do the character physics even allow that?

 

For the case you don't know what I mean, try spawning something up in the air and watch is slowly descent. Or try to launch the player in the air.

It should easily be possible, even without changing the stategraph. The only question is: do the character physics even allow that?

 

For the case you don't know what I mean, try spawning something up in the air and watch is slowly descent. Or try to launch the player in the air.

 

   No, I'm not talking about launching entities vertically; I simply mean a weapon which

pushes a mob back away from the player for a certain predetermined horizontal distance.

Is that possible, and if so, how would one go about doing it?

The game's physics engine should be able to handle a velocity vector, so you could make something arc rather than fall straight down. I believe that's the method behind items bouncing when they hit the ground. Check the boomerang and other projectiles to see how they're handled fro more info.

 

The reason Mobbstar suggested using the physics engine is that it could otherwise require fiddling with stategraph files to include a knockback event. And if you want the knockback weapon to work on more than one creature type, that's a lot of stategraph files.

 

Another alternative would be to teleport the creature a very small distance away from the player every fraction of a second. It might look a little jittery though.

Edited by chromiumboy

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...