Why simple rule (timer + move) not work?

GameOver159GameOver159 Member Posts: 3
edited March 2014 in Working with GS (Mac)

Hello.

I trying to move my actor every 1 second and crete for this actor a simple rule like this

Timer ---- every 1 seconds, run to completion

Move --- direction 0, relative to actor, move type additive, speed 100

But this simple rule not work. Why?
I saw this example rule in GameSaladManual.pdf ive downloaded from GS site.

Comments

  • jigglybeanjigglybean Member Posts: 1,584

    I think you need to give it a direction using X or Y - depending on how you want the actor to move.

    Like Balls? Then click here! We've 100 coming soon

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited March 2014

    @GameOver159 Another thought: are you certain you saw the example rule you gave in the GS manual? The Timer is not relevant to the movement of the actor, if you want the actor to move constantly.

    So if that's the case, just have your Move behaviour on its own (i.e delete the Rule).

    But if you want the actor to move for one second then stop for one second, move for one second, etc., continuously, then try something like this (after making a new boolean attribute):

    Rule: When Attribute Move is false
    Timer For 1 second
    Move direction 0, relative to actor, move type additive, speed 100
    Timer After 2 seconds -- in the same Rule but not within the above timer
    Change Attribute Move to true
    
    --
    
    Rule: When Attribute Move is true
    Change Attribute Move to false
    

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • GameOver159GameOver159 Member Posts: 3
    edited March 2014

    @jigglybean said:
    I think you need to give it a direction using X or Y - depending on how you want the actor to move.

    Hmm.. I had to think about it from the beginning... Thank you!
    But strange that why in the documentation PDF file was used Move behavior instead of Change attribute self.Position.X +/- someValue...

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited March 2014

    You're welcome.

    @GameOver159 said:
    But strange that why in the documentation PDF file was used Move behavior instead of Change attribute self.Position.X +/- someValue...

    To clarify, the Move behaviour changes the position of an actor over time; a Change attribute behaviour changes a value, that's it. One isn't a replacement for the other, as they do totally different things...

    Anyhow, excellent that you're going through the Manual if you're new to the GameSalad Creator; it'll all come together for you, I'm certain. :smile:

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • GameOver159GameOver159 Member Posts: 3

    @gyroscope said:
    GameOver159 Another thought: are you certain you saw the example rule you gave in the GS manual? The Timer is not relevant to the movement of the actor, if you want the actor to move constantly.

    I saw this example rule in this PDF file http://download.gamesalad.net/manuals/GameSaladManual.pdf on page #17.

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited March 2014

    Hey , thanks for the pic evidence. :smile: (Sorry I doubted you!)

    Well, as far as I'm concerned, that's a mistake... I can't see what the point is of putting a Move Behaviour into a Timer set to Every.... and anyhow, with Every set, the move won't work (as you've discovered).

    So surely that leaves only two options to what it should be:

    1. set the Timer to For, or After -- depending on the other Rules/conditions

    2. Delete the Timer all together. -- (although more likely to be no.1)

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

Sign In or Register to comment.