Jump to content
  • 0

Can I limit the reach of a weapon?


Szuran

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?

Edited by Szuran

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.

Edited by Doomkid

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...