Help with appearing and disappearing the actor every time when I press the button

Hello, I have inventory open/close button, inventory small item and zoomed in of inventory small item on the scene. When I press the inventory small item: change attribute game.zoomitem to true. Zoom item rule: attribute game.zoomitem true. Change attri: color Alfa to 1. Second rule: if inventory control =0 zoom item's Alfa color to 0. It works only one time. How to make it in each time. Open the inventory, press small inventory item and the big zoomed in item color =1. again and again

Comments

  • sparkaniasparkania Member, PRO Posts: 300
    put in an 'else' condition which returns the actor to it's original state
  • alarm656alarm656 Member Posts: 291
    edited January 2013
    Where "otherwise?
    put in an 'else' condition which returns the actor to it's original state
    Where "otherwise"
  • sparkaniasparkania Member, PRO Posts: 300
    I use the windows version.. for many condition blocks which you add to an actor there is a Condition like "If" xxxx then below that there is a "Do" field and then an "Else" field. This can be your complete switch like If the actor is touched, Do change alpha to 255, change xxx attribute to 1, Else change alpha to 0, change xxx attribute to 0.

    Use the Else (if it says Otherwise on Mac I don't know) to return the actor to it's previous state otherwise it will remain used only that 1 time.
  • alarm656alarm656 Member Posts: 291
    I use the windows version.. for many condition blocks which you add to an actor there is a Condition like "If" xxxx then below that there is a "Do" field and then an "Else" field. This can be your complete switch like If the actor is touched, Do change alpha to 255, change xxx attribute to 1, Else change alpha to 0, change xxx attribute to 0.

    Use the Else (if it says Otherwise on Mac I don't know) to return the actor to it's previous state otherwise it will remain used only that 1 time.

    yes, rule; when and otherwise))) I already do that like that. But to see the zoomed in cood you have to press small inventory cod and hold. if you realise the small cod in inventory than the big zoomed in cod will disappear))))
  • alarm656alarm656 Member Posts: 291
    I use the windows version.. for many condition blocks which you add to an actor there is a Condition like "If" xxxx then below that there is a "Do" field and then an "Else" field. This can be your complete switch like If the actor is touched, Do change alpha to 255, change xxx attribute to 1, Else change alpha to 0, change xxx attribute to 0.

    Use the Else (if it says Otherwise on Mac I don't know) to return the actor to it's previous state otherwise it will remain used only that 1 time.


    small inventory cod actor.
    (When) 1 Rule. actor recei.event touch is pressed
    change attribute: game.zoom.cod(boolean) to true

    (otherwise)
    change attribute: game.zoom.cod to false


    Zoomed in big cod actor.

    Rule 1: (when) Attribute game.zoom.cod is true
    change atrri: self.color.alfa to 1

    (otherwise)
    Rule2 in 1Rule. Attribute game.zoom.cod is false
    change attribute: self.color.alfa to 0


    2 Rule. actor touch pressed
    attribute game.zoom.code is false
    change attribute: self.color.alfa to 0

    that's all. I do not know where the mistake(((
Sign In or Register to comment.