How my character actor stop collide with other actor?

Hello , i have a problem with two actors, My hero actor collide with an enemy actor, the enemy has an interpolation when collide with the hero and goes down of the screen, all ok because when the hero key is down the enemy goes down, but when the hero collide with the enemy and once collide the key is up the hero actor loose a live because the enemy is already near the actor, is there any rule for the hero that when the hero collide with the enemy, will stop collide with the enemy?, thanks.

Comments

  • DinoBitDinoBit Member Posts: 23
    I'm sorry, I can hardly understand what you are asking. It sounds like English isn't you first language (sorry if I'm wrong). Are you wanting the ebony to disappear after the hero collides with it? If so then make a rule in the ebony actor. When it overlaps or collides with actor hero, destroy actor.
  • agueisagueis Member Posts: 420
    Hello DinoBit, i´m from Spain, I try to explain : My main player attacks an enemy with a twist like super mario, collides with the enemy hero and must change the condition of collision, because I have chosen not to destroy, I chosen to interpolate and there is less space to a second where the enemy collides interpolated the hero and lose a life.
    I want to know: How do I remove the collision to avoid losing a life with interpolation?

    Thank you.
  • SocksSocks London, UK.Member Posts: 12,822
    Hello DinoBit, i´m from Spain, I try to explain : My main player attacks an enemy with a twist like super mario, collides with the enemy hero and must change the condition of collision, because I have chosen not to destroy, I chosen to interpolate and there is less space to a second where the enemy collides interpolated the hero and lose a life.
    I want to know: How do I remove the collision to avoid losing a life with interpolation?

    Thank you.
    One trick would be this:



    1) Hero collides with enemy.
    2) Enemy is destroyed (instantly) and replaced with a 2nd enemy actor that does not have the collide rule.

  • SocksSocks London, UK.Member Posts: 12,822
    This kind of thing . . .
  • SocksSocks London, UK.Member Posts: 12,822
    ...
  • DinoBitDinoBit Member Posts: 23
    edited November 2013
    Ok, I got it. Try this. Create a boolean attribute, and name it Destroy. Now, inside the enemy actor, you will want to have a rule that says this: when actor recieves event, overlap or collides, with actor of type, hero. Inside the rule have Interpolate self.alpha to 0 in 0.3 seconds. In the rule, add Change attribute, Destroy, true. in the rule again, add a timer and make it say, after 0.4 seconds, change attribute, Destroy, false. Add an other timer in that rule and make it say after 0.5 seconds, destroy actor. Now, go into your hero actor and go into the rule that makes the actor lose a life when it collides with the enimy, and next to the "when actor collides with actor of type, enemy" press the plus button and make it say this. "attribute, Destroy, false".
    What that will do, is after colliding with the enemy, the hero can't be hurt by the enemy untill it's gone. I hope this helps :D good luck!
  • agueisagueis Member Posts: 420
    Thanks very much Socks.
  • SocksSocks London, UK.Member Posts: 12,822
    edited November 2013
    Thanks very much Socks.
    @agueis

    Another way - have an attribute that needs to be switched on to let the collision happen - when the collision has happened then switch the attribute off . . . so no more collisions !
Sign In or Register to comment.