Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0
Szuran

Can I limit the reach of a weapon?

Question

I want to make a projectile that, if it doesn't encounter any obstacle, enters its death state after a certain distance. Is this even possible?

Share this post


Link to post

4 answers to this question

Recommended Posts

  • 0

Sure, most projectiles have 2 frames of animation that call eachother in an endless loop. If you make it so that the second frame goes right into the object's death sequence, the projectile will be gone before it hits the wall, unless a wall is very close. It's kind of hard to explain so if you don't get it I can make an example.

 

 

Share this post


Link to post
  • 0
22 minutes ago, Doomkid said:

Sure, most projectiles have 2 frames of animation that call eachother in an endless loop. If you make it so that the second frame goes right into the object's death sequence, the projectile will be gone before it hits the wall, unless a wall is very close. It's kind of hard to explain so if you don't get it I can make an example.

 

 

So, if I understand correctly, I'd have to make its animation as long as I want the reach of the projectile to be? It'd be more about timing than setting distance, right? Like...

 

Spawn:
AAAA A 5
AAAA B 5
AAAA A 5
AAAA B 5
AAAA A 5

Goto Death

?

 

EDIT:

But in this case, wouldn't it stop at the wall until it ends its animation instead of going to death upon touch?

Share this post


Link to post
  • 0

That’s correct. The great thing in DeHackEd is that you can make it have separate animations: one for naturally fizzling out mid-air, just by playing it’s entire animation, and another actual “death by hitting the wall” set of frames (simply referred to as the objects death state). This way you could have the object play it’s normal animation in mid air which leads to it ‘fizzling out’ (and never reaching it’s true death state) and a totally separate, faster or slower animation for death by wall contact.

Share this post


Link to post
  • 0

Thank you, that's extremely helpful. I think that for the weapon I am making (basically a flamethrower), having it finish the animation after hitting the wall would actually look better.

Share this post


Link to post

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
×