How to control speed in a game?

ozboybrianozboybrian PRO Posts: 2,102
edited December 2011 in Working with GS (Mac)
I've done this with Tshirt once a long time ago.

I've set it up so that when Actor is destroyed it changes position to off screen.
I have the move behaviour, but I don't want it to move in straight away.

So i'm thinking i'm going to have to set move to 0... And set up random timers etc.

Can anyone help?

Thanks.

Comments

  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    Give it an actor attribute that has the actors speed so you can change it when needed.(via rule)

    Or better yet, put the Move behavior in a rule that doesn't activate until you need it.
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    What are you trying to accomplish?
    Are you wanting the actor to move off screen without anyone seeing it?
  • ozboybrianozboybrian PRO Posts: 2,102
    How does the game know it's speed though?.. Instead of writing a number I use the att hey.

    I want to set up the actor so it stops and goes when I want it to.
  • zapposhzapposh Member Posts: 65
    Set up a boolean attribute like GoOn, and then a rule on the actor: If attribute GoON = true, the actor goes to wherever you want him to, and when false, he stays where he is.
  • ozboybrianozboybrian PRO Posts: 2,102
    But how do I make him stay?
  • zapposhzapposh Member Posts: 65
    Many ways to do it, but one could be:
    If GoON=false , then actor->motion->linear->X,Y=0

    Simpler would be to make him do something when an action is triggered by a rule. In the opposite case, your actor will do nothing=stay where he is.
Sign In or Register to comment.