"Freezing a moving actor"

akimannakimann Member Posts: 62
edited November -1 in Working with GS (Mac)
I do have an actor that is moving in 20s from left to right. This works fine with "self.Position.X to 320"...Duration 20s" (Function: Linear)

But here is my problem: When I press a "Freeze-Button", how could I manage, that in this case the moving actor stands still. And when I press the button again the actor should continue to move his way from the place he stoud still???

Comments

  • ToastKittenToastKitten Member Posts: 360
    Couldn't you make a boolean variable "isFrozen" inside of your moving actor and then have the rule:

    after 20 seconds (or however long you want your timer)
    if attribute isFrozen = true
    moving rule
    otherwise
    moving rule with no attributes or something

    Sorry if this doesn't work, I've never used the "move" or "move to" behavior before :/ Just let me know how it goes and if it doesn't work, I can help you with a workaround or something :D
Sign In or Register to comment.