True and False statement trouble?

allc1865allc1865 Member, PRO Posts: 777
edited November 2013 in Working with GS (Mac)
I want my player to get from point A to point B. But, in order to get to point B, he has to have had gone to point A first.
So I have rules set up in my player and point B.
In my player I have:
When actor collides with point A, change attribute to false.
Then in the point B actor I have:
When actor collides with player, change attribute to true.
change scene
So that way only when my actor has made it to point A, can he go to point B and have the scene change.
However this isn't working, so I'm wondering what I'm doing wrong...
Thanks in advance!

Best Answer

  • AppTacoAppTaco Posts: 125
    Accepted Answer
    Hello,

    What you need is your game to know if the actor has gone to point A yet. First create a boolean attribute and name it "A reached" (or whatever you want to call it), then make a rule in the actor that says,
    If actor collides with Point A actor, then change attribute "A reached" to true. Then make another rule in the actor that says,
    If attribute "A reached" is true, then move to point B.
    And then you can make another rule that says,
    When actor collides with actor Point B, then change scene.

    I hope this helped.

Answers

  • allc1865allc1865 Member, PRO Posts: 777
    @PureEpicStudios, thanks for your reply! I see what you've done, but the player will go to point A > change to true > then the player will move the actor using controls to point B...
    So I don't think the last rule: When actor collides with actor Point B, then change scene would work because if the player goes to point B first, it'll change scenes.
    Hope that explains it. Thanks again! :)
  • allc1865allc1865 Member, PRO Posts: 777
    Never mind! I got it figured out! Thanks for your help! :)
  • AppTacoAppTaco Member Posts: 125
    Glad to have helped. :)
Sign In or Register to comment.