Make a ball bounce up and down

kingkwong92

Well-Known Member
Reaction score
25
Sorry to double post but I had no views anyway. I wanted to change my title. I want a trigger that makes my basketball bounce up and down.
 

IronTrout

New Member
Reaction score
20
Deadly task that, I'd suggest making the ball a flyer unit, and do some animation - change flying height triggering. I haven't tried it, but i'm sure it'd work :)
 

kingkwong92

Well-Known Member
Reaction score
25
Yea I tried it for the first time and it doesn't work! I made it a flying unit and changed its animation flying height but it doesn't work.
 

IronTrout

New Member
Reaction score
20
Trigger:
  • Bouncy
    • Events
      • Time - Every 0.04 seconds of game time
    • Conditions
    • Actions
      • Set BounceBall = ChikahChickahhh 0003 <gen>
      • Set BounceHeight = (Current flying height of BounceBall)
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • BounceHeight Less than or equal to (<=) 100.00
            • BounceHeight Greater than (>) 80.00
          • Then - Actions
            • Set BounceChecker = True
          • Else - Actions
            • Do nothing
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • BounceHeight Less than or equal to (<=) 559.00
            • BounceHeight Greater than (>) 500.00
          • Then - Actions
            • Set BounceChecker = False
          • Else - Actions
            • Do nothing
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • BounceChecker Equal to (==) True
          • Then - Actions
            • Animation - Change BounceBall flying height to (BounceHeight + 6.00) at 100.00
          • Else - Actions
            • Animation - Change BounceBall flying height to (BounceHeight - 6.00) at 100.00


That seems to work fine.. You can really make the ball look like its bouncing by doing stuff like change the (bounceHeight - 6.00) into something like (BounceHeight - (6 - (BounceHeight / 100)))

I haven't tested that, but the theory is that the higher it gets to 560 (the max height) the slower it will move.. but my maths is often off, so done quote me for it :)

Edit: Oh and BounceBall is the unit and so is Chickachickaaa :)
BounceHeight is the flying height of the unit
and BounceChecker is just a boolean
 

kingkwong92

Well-Known Member
Reaction score
25
Thanks, I don't know what's wrong with mine because it's pretty similar to yours. It works now anyway. Thanks! +REP

EDIT!! Height less that or equal to 0 doesn't work. Thats why mine wasn't working. Thanks anyway
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top