crawling

greyroomgreyroom Member Posts: 4
edited November -1 in Working with GS (Mac)
Hello, i am very new with this game salad and I need to make the actor crawls.
How do i set up a new rule (or what rule to use) since I already used the move tool and set the directional key on the keyboards for walking.

Basically what i have done is i have set when i press the down key (keyboard) the actor squats down. But after that i want the actor to crawl from that position. Right now after it squats down and if i were to press the left key, it will stand up and walk instead.

Thank you.

Comments

  • firemaplegamesfiremaplegames Member Posts: 3,211
    Hey,

    You'll have to nest two rules together, like this:

    Rule:
    When KEY is PRESSED (down)

    Rule:
    ANY
    When KEY is PRESSED (left)
    When KEY is PRESSED (right)
    show crawling animation
    OTHERWISE
    just squat

    Something like that.
    Hope this helps!
  • greyroomgreyroom Member Posts: 4
    hmm... it does't work..

    But i got that fixed already..
    now the problem is when i want to stand up after crawling, i have set the key to stand up when i press the key "UP" but when i press left / right for it to walk, it crawls instead.. haha..

    Any idea?
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    i'd use an attribute to help out

    create an attribute called crawling. then when a user hits down, it sets crawling to 1. then in your movement rules have something like this:

    if Left is down
    move left

    if Right is down
    move right

    if game.Crawling is 1 and LEFT is down
    crawl left

    if game.Crawling is 1 and RIGHT is down
    crawl right
  • greyroomgreyroom Member Posts: 4
    it doesn't seem to work. the actor won't even crawl.
  • greyroomgreyroom Member Posts: 4
    ok, i got it to crawl. Thanks.
    But now it won't walk and crawl all the way instead.. haaha
Sign In or Register to comment.