Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Want to make my main actor get "frozen" for "x" seconds after colliding with another certain actor

pretty much have items falling from the sky and one of the items i want to freeze my character in place for "x" seconds when they collide. i thought i was getting close but couldnt exactly figure it out. thanks


  • HopscotchHopscotch Posts: 2,782Member, PRO

    @nicksoldo14 Welcome!

    Do you want the character to continue at its original speed and direction after the freeze is over?

    Also, please be a bit more specific with what you are having problems with. The Rule, stopping the character or making it continue?

  • nicksoldo14nicksoldo14 Posts: 2Member

    yeah i want him to continue at his original speed and direction. I just couldnt figure out the rule to make an incoming actor stun/freeze my main actor for a second and then unfreeze after the second and have my main actor continue what he was doing.



    Probably helps to @ people you are replying to so they can see it easier.

    As for the issue, I feel this could help to explain a little about how the main actor moves. Like is it a key press, touch? Or does the main actor move automatically?

    The simple function for making a freeze to make the main actor stop when collided with the actor is to use a custom boolean attribute under the actor attributes. You can set the movement rule with an attribute condition saying if self.freeze is false then movement happens.
    Then have another rule saying actor collides or overrides with incoming actor, then sets self.freeze to true as well as having a timer saying after so many seconds you want the freeze to happen for, then turn self.freeze off.

  • RabidParrotRabidParrot Formally RabidParrot. Posts: 956Member
    edited August 2015

    When player collides with enemy

    For 2 seconds

    constrain self.motion.linearvelocity.Y to 0

Sign In or Register to comment.