How do I get my character to spawn his weapon on attack?

0 favourites
  • 5 posts
From the Asset Store
Futuristic Weapons Vol 1
$7.20 USD
40% off
Futuristics Weapons Vol 1 includes 8 different weapons, in a total of 216 sounds
  • So I would like my "character" to spawn a whip on attacking. I have created a seperate sprite for the whip and put a "image point" on the attack animation frame 1. My event sheet is:

    • When the mouse is clicked
    • Play Attack Animation
    • Wait 0.2 seconds and spawn Whip on image point "hand"
    • Wait 0.2 seconds and destroy whip.

    It works fine for standing still but doesn't line up correctly when moving.

    Is there some way to get the whip to spawn only on the attack frame ?

  • I think something like this is what you are looking for :

    It will spawn the weapon on the 4th frame of the animation, and then destroy it when the animation is finished. You could also have it be destroyed at a specific frame if you wanted. It also keeps the weapon attached to the spawn point during the duration.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I think something like this is what you are looking for :

    It will spawn the weapon on the 4th frame of the animation, and then destroy it when the animation is finished. You could also have it be destroyed at a specific frame if you wanted. It also keeps the weapon attached to the spawn point during the duration.

    Well I learned something new today!

    It kinda works, if I interupt the animation then the whip still gets stuck on the screen but im sure I can figure that out. You sir are a real help! Thank you

  • To solve that you can just add an invert of the "Is Animation Playing" condition and have it destroy the object. That way it's never spawned if the animation isn't playing.

  • That's cool,guys.. but can we rotate the sword with the hand so it's more realistic?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)