Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
hyperPad

hyperPad Forum

  1. Home
  2. Help and Support
  3. Proper chain for applying and power-up and turning it off

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

Scheduled Pinned Locked Moved Help and Support
5 Posts 2 Posters 700 Views 1 Watching
  • 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
    versioneightV Offline
    versioneight
    wrote on last edited by
    #1

    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
    2
    • versioneightV versioneight

      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 Offline
      NeilSennN Offline
      NeilSenn
      wrote on last edited by
      #2

      @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
      3
      • NeilSennN NeilSenn

        @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 Offline
        versioneightV Offline
        versioneight
        wrote on last edited by
        #3

        @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 😂🙏

        NeilSennN 2 Replies Last reply
        3
        • versioneightV versioneight

          @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 😂🙏

          NeilSennN Offline
          NeilSennN Offline
          NeilSenn
          wrote on last edited by
          #4

          @versioneight Apologies for replying four days later I was out for the weekend.
          I now see your issue; It would seem the "ignore bullets" behavior was designed for scene objects where you want to ignore bullets permanently. In the forum someone said disabling it with a "set behavior state" should also disable the effect but that isn't working for me so I used tags to work around it:
          Instead of having the collision with the power-up set a "ignore bullets" behavior; you can have the bullets set to collide with a specific tag (I see you're using tags already). When the player collides with the invincibility item, use a "modify tags" behavior to disable or change the assigned tag. This will make bullets no longer impact. Next, add a timer attached to another "modify tag" to re-set the tag to normal making bullets hit again.
          This tag logic should be adaptable for applying various effects. If you need a screen shot or have further questions let me now. I honestly enjoy solving problems and I'm learning as well so this is all good stuff :)

          1 Reply Last reply
          3
          • versioneightV versioneight

            @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 😂🙏

            NeilSennN Offline
            NeilSennN Offline
            NeilSenn
            wrote on last edited by
            #5

            @versioneight P.S. you might want to have a tag for bullet collisions specifically. Found out the hard way things get screwy if you start trying to use the same tags for more than one function

            1 Reply Last reply
            3

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Search