Rule in a Rule wont work

MichaelK1985MichaelK1985 Member Posts: 36
I currently working on a game and I can't get this to work.

I want this:
I want a go button when a attribute = or is greater than 2.
I get the image, that change good!! But I also want a rule that when you touch the button you go to the next scene. But that won't work. Any ideas about this?

http://i43.tinypic.com/2pzh741.jpg

Comments

  • calvin9403calvin9403 Member Posts: 3,186
    What button? The go button? Then you will have to make the button an actor and set the rule there

    Calvin
  • CloudsClouds Member Posts: 1,599
    When attribute = or > than 2:

    Destroy this actor
    . . . . and . . . .
    Spawn Actor (make the actor that is spawned your 'go button' / position 0 and 0)

    ____________________________________

    Now place this rule on the actual 'go button' itself:

    When touch is pressed:

    Go to scene (Next scene).
  • MotherHooseMotherHoose Member Posts: 2,456
    @MichaelK1985

    think it might be the nested Rules …

    Try with 2 separate Rules:
    Rule 1: when
    Attribute: {game.Team...} ≥ 2
    --changeAttribute: self.Image To: {go-button.png}

    Rule 2: when (All)
    Attribute: self.Image is go-button.png
    Actor receives event: touch is pressed
    --changeScene

    MH
  • SlickZeroSlickZero Houston, TexasMember, Sous Chef Posts: 2,870
    edited December 2011
    Yeah, you have a "when touch is pressed" rule in there to go to another scene that is attached to an attribute change. The problem is you can't touch an attribute with your finger. You need to create a rule inside the green button actor that says "when touch is pressed - go to next scene…"

    What Tynan and MotherHoose said already, basically. :P
  • MichaelK1985MichaelK1985 Member Posts: 36
    Thnx it works :) I edit this in the screen self. That was the BIG mistake.
Sign In or Register to comment.