• edited September 2022
    gamingislove said: E.g. have an Auto Machine on the button to execute when the button is enabled (i.e. start type Enable) to get the context item from the button and use an UI Toggle to change a Toggle component's state based on the item's variable.
    This step you suggested. But I've also added a repeat event every 1s.
    Button of an inventory menu screen. Put a Gameobject -> UI -> Toggle component under a separate gameobject with UI Color changer -> Children off.

    1. Then add an item into your inventory e.g. via Add to inventory node.
    2. Have it's item variable - local - bool turn ON via any event so it also turns that Toggle value ON.
    3. Add another item into your inventory to make sure it's after the first.
    4. Then just Remove from inventory node the first item only.
    5. Notice the last added item moves to the first and gets it's UI Toggle component set ON by itself and not even triggering the auto machine. And then the repeat mechanism on it starts triggering but this time inverted values since item variable is OFF but the Toggle is ON :)
    Post edited by Machal on
  • Can you show me the schematic that handles the toggling on/off? Also settings of the involved nodes :)
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Sent you e-mail.
  • I'll check it out and test it.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.