hit an actor with touch if not too far

keekee312keekee312 Member Posts: 91
edited November -1 in Working with GS (Mac)
hi, i have an issue : i want the main actor to throw its tongue on an other actor (ennemy) when the player touch the ennemy to destroy it only if the ennemy is not too far away but i don't manage to do it. To make the ennemy destroy when touched is ok but i don't know how to make the rest.

Thanks

Comments

  • charlieaf92charlieaf92 Member Posts: 84
    I would create an invisible actor and constrain it to where the tongue will reach relative to your player actor. Then, when the control to spit out the tongue is activated, check the invisible actor and the enemy for collision.

    If the entire tongue can collide and do damage, the invisible actor could be the tongue and just change the image when the button is pressed.

    If you just want the tip to have a collision check, put the invisible actor at where the tip will go. If you don't want a hit scan effect, you may need to incorporate a timer to account for the time it takes for the tongue to reach the target.
  • keekee312keekee312 Member Posts: 91
    Thank you for your answer but i dont manage to do it :s i keep looking at the forum to look for someone having a similar problem
  • keekee312keekee312 Member Posts: 91
    Hi again, I've seen this thread ( http://gamesalad.com/forums/topic.php?id=5716#post-36188 )
    where Jweaver911 wanted the same thing as I'm looking for. I just managed to spawn an actor from the character to the point I click (like an ammo) but I don't manage to make a real tongue which spits out from the character to where I click.

    I tried many things but I miss something else.

    Thank you very much for help. My game is pretty much done so I'm waiting for your answer(s)
Sign In or Register to comment.