hyperPad hyperPad Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Login

    Proper chain for applying and power-up and turning it off

    Scheduled Pinned Locked Moved Help and Support
    3 Posts 2 Posters 24 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • versioneightV Offline
      versioneight
      last edited by

      Hi everyone,

      I am having difficulty getting power ups to work in my games. I can turn them on and the effects work but I can’t figure out how to shut them off.

      Any help would be appreciated thank you I’m very new to building games.

      NeilSennN 1 Reply Last reply Reply Quote 1
      • NeilSennN Offline
        NeilSenn @versioneight
        last edited by

        @versioneight With a screenshot of your behaviors we can have a more specified discussion, but off the bat a "set behavior state" behavior (in behavior tab "custom") will probably get you to where you want to be.
        Say you want the item buff to last 30 seconds: after the buff trigger, add a "timer" behavior. Attach a "set behavior state" and make it turn off the behavior tree inflicting the buff (setting the behavior state to "off" on any behavior in a behavior tree will stop all subsequent behaviors from triggering as well.)
        There's some complications here like: 1. if the buff was a flat value addition, turning of behaviors won't then change values back (in that case you could reverse the effect by storing the buff value and adding when buffed, subtracting when not. 2. You will need to turn the behavior tree you turned off back on so that it's ready to receive a subsequent buff (can be done with the existing timer or maybe when the object is picked up or whatever).
        I feel like I'm not making a ton of sense but if you screenshot the behavior tree I promise to be a little more coherent xD

        versioneightV 1 Reply Last reply Reply Quote 1
        • versioneightV Offline
          versioneight @NeilSenn
          last edited by

          @NeilSenn IMG_0497.png

          Thank you so much for your help here’s a screenshot I’m very new to understanding how the chains flow haha 😂🙏

          1 Reply Last reply Reply Quote 1
          • First post
            Last post