help with my five night at freddys clone(DOORS)

since i fixed the camera on my last discussion, now its time for doors. how do i make more like a switch to active the door by closing it or open?

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    You can use a boolean or integer attribute to make a switch. An example would be When touch is pressed, change game.switch (integer) to 1-game.switch. This will toggle between values of 0 and 1, and then you can have rules that say When attribute game.switch=0... and when attribute game.switch=1...

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • Koridai011Koridai011 Member Posts: 32

    @tatiang said:
    You can use a boolean or integer attribute to make a switch. An example would be When touch is pressed, change game.switch (integer) to 1-game.switch. This will toggle between values of 0 and 1, and then you can have rules that say When attribute game.switch=0... and when attribute game.switch=1...

    can you bring up an image?

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    You could spawn an image or change an image within either of those rules. Is that what you mean?

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • Koridai011Koridai011 Member Posts: 32

    @tatiang said:
    You could spawn an image or change an image within either of those rules. Is that what you mean?

    I mean what are the rules?

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited February 2015

    When attribute game.switch=0
    .....Spawn Actor [actor name]

    or

    When attribute game.switch=0
    .....Change Image [image name]

    And then do the same for game.switch=1

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Sign In or Register to comment.