help creating a rule!

gamerofthesaladgamerofthesalad Member Posts: 2
edited November -1 in Working with GS (Mac)
i am trying to create a rule where if the player collides with an obstacle, something (another actor) disappears but it will only let me make the actual player disappear.
anybody know what to do?

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    create a game attribute, you can make it a integer and call it disappear or whatever you want

    Have a rule when the player collides with the obstacle you want,
    then put a change attribute behavior in that rule and change attribute disappear to 1

    then in the other actor you want to disapear, have a rule when attribute disappear=1
    then put a change attribute behavior in that rule and change attribute self.color.alpha to 0
  • osucowboy18osucowboy18 Member Posts: 1,307
    Use a global bolean attribute called game.Disappear and use this rule in the player actor.

    Rule:
    When actor collides with obstacle...
    Change Attribute game.Disappear to true
    End Rule

    Then in the obstacle actor, put this rule.

    Rule:
    Attribute game.Disappear is true...
    Destroy This Actor.
    End Rule

    Hope that helps :)

    - Alex
    _________________________________________________________________________________

    Target Practice Template
    Custom Soundtracks and Sound Effects For Sale
    Vertical/Horizontal Level Select Template
    Mac Mini For SALE!!!

    Edit: Dang it John, you beat me!!!
Sign In or Register to comment.