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

    Behavior stop not working

    Scheduled Pinned Locked Moved
    Help and Support
    4
    10
    130
    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.
    • SplitMindGamingS
      SplitMindGaming
      last edited by

      I have a rock set to spawn on top of the screen to fall down using spawn area. I also have a person below dodging the rocks. I set up behavior with the rock that when it hits the person it destroys the object and also set up a behavior stop to stop spawning the rocks. Everything works but the behavior stop to stop spawning the rocks.

      MelideM 1 Reply Last reply Reply Quote 0
      • MelideM
        Melide @SplitMindGaming
        last edited by

        @SplitMindGaming I didn't understand your problem well, but I think that you put the behaviors in the rock's behavior. If the rock is destroyed, it will stop spawning cause the behaviors now don't exist.

        Or, you haven't put a Timer or a behavior that trigger multiple times.

        So make sure the behaviors are not in the rock's behavior and put a behavior that activate multiple time such as a Timer.

        1 Reply Last reply Reply Quote 1
        • MelideM
          Melide
          last edited by

          Also, don't put anything like this in the Bug Report category. I guess you haven't seen the rules to submit here : https://forum.hyperpad.com/topic/1105/rules-for-making-bug-submissions

          You better send this in the Help & Support category.

          SplitMindGamingS 1 Reply Last reply Reply Quote 0
          • SplitMindGamingS
            SplitMindGaming @Melide
            last edited by

            @XxWhiteHearrxX sorry just seen the forum rules. I beleive in this case it is a bug. I have attached screenshot. When the rock collides with the character its suppose to stop the spawn behavior of the rock. But it doesnt. I will try upload file as well.AF2038AC-73CF-491B-9333-1ADC02A17629.png

            1 Reply Last reply Reply Quote 0
            • SplitMindGamingS
              SplitMindGaming
              last edited by

              Stone Vs Caveman.tap

              1 Reply Last reply Reply Quote 0
              • MurtazaM
                Murtaza Admin
                last edited by

                The screen shot helped!
                The issue is you're recursively spawning.
                What I mean is you're spawning rocks, that are spawning rocks.

                Each rock is a new instance, so a NEW spawn behaviour. So the behaviour off is actually working.... On that original rock. but you've already spawned a new rock by this point, and it will be On.

                Put your logic on another object that handles all of this.

                Also, you probably don't want to use while colliding, instead use Start colliding, or stop colliding.
                While colliding will continuously trigger until they are no longer touching. This may give some odd results. For example, try playing a sound on while colliding, it you will see the isue.

                SplitMindGamingS 1 Reply Last reply Reply Quote 1
                • SplitMindGamingS
                  SplitMindGaming @Murtaza
                  last edited by

                  @Murtaza makes sense. How do i set it up to stop spawning all rocks upon colliding?

                  Aidan_FireA 1 Reply Last reply Reply Quote 0
                  • Aidan_FireA
                    Aidan_Fire @SplitMindGaming
                    last edited by Aidan_Fire

                    @SplitMindGaming I would recommend putting your logic that spawns the rocks inside another object. Either inside the player or perhaps inside a new invisible scenery object. If you do this, the behaviour off that turns off the rocks will stop all rocks from spawning. I would also suggest that maybe you should make the rocks delete themselves after some time otherwise they might build up and lag your game eventually.

                    SplitMindGamingS 1 Reply Last reply Reply Quote 1
                    • SplitMindGamingS
                      SplitMindGaming @Aidan_Fire
                      last edited by

                      @Aidan-Oxley i will give that a try. Thank you so much for your help.

                      1 Reply Last reply Reply Quote 0
                      • MurtazaM
                        Murtaza Admin
                        last edited by

                        Moved this to Help and support, as it's not a bug.

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