Push trigger problems

eztype1

New Member
Reaction score
0
basicaly my trigger is set so someone enters a region, a dummy casts a push spell on them, they get pushed down a waterfall to the landing region. it works 95% of where it should go, then any time after that it glitches, they get moved to the same spot then are pushed, regardless of where they are. Heres a youtube of it aswell as code.

[YOUTUBE]Zkeb95jiPYQ[/YOUTUBE]

Trigger:
  • push effect1
    • Events
      • Time - Every 0.04 seconds of game time
    • Conditions
    • Actions
      • Visibility - Create an initially Enabled visibility modifier for (Owner of Knockbacktarget[(Integer A)]) emitting Visibility across Waterfall Vision 1 <gen>
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Set Knockbackdegrees[(Integer A)] = (Angle from Knockbackpoint[(Integer A)] to WFB1)
          • Set Knockbacktargetpointcheck2[(Integer A)] = (Position of Knockbacktarget[(Integer A)])
          • Set Knockbacktargetpointcheck[(Integer A)] = (Knockbacktargetpointcheck2[(Integer A)] offset by 10.00 towards Knockbackdegrees[(Integer A)] degrees)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Kinterger[(Integer A)] Less than 150
              • ((Playable map area) contains Knockbacktargetpointcheck[(Integer A)]) Equal to True
            • Then - Actions
              • Unit Group - Pick every unit in Knockbackedunits[(Integer A)] and do (Actions)
                • Loop - Actions
                  • Unit - Turn collision for (Picked unit) On
              • Custom script: call DestroyGroup( udg_Knockbackedunits[GetForLoopIndexA()] )
              • Custom script: call RemoveLocation( udg_Knockbacktargetpoint[GetForLoopIndexA()] )
              • Special Effect - Create a special effect at Knockbacktargetpointcheck2[(Integer A)] using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
              • Set Smokeeffect = (Last created special effect)
              • Special Effect - Destroy Smokeeffect
              • Unit - Cause Knockbackcasting[(Integer A)] to damage Knockbacktarget[(Integer A)], dealing 0.05 damage of attack type Chaos and damage type Normal
              • Set Knockbacktargetpoint[(Integer A)] = (Knockbacktargetpointcheck2[(Integer A)] offset by 10.00 towards Knockbackdegrees[(Integer A)] degrees)
              • Unit - Move Knockbacktarget[(Integer A)] instantly to Knockbacktargetpoint[(Integer A)]
              • Unit Group - Pick every unit in Knockbackedunits[(Integer A)] and do (Actions)
                • Loop - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Playable map area) contains Knockbackunitspoint[(Integer A)]) Equal to True
                      • Knockbacktarget[(Integer A)] Not equal to No unit
                    • Then - Actions
                      • Set Knockbackedunit[(Integer A)] = (Picked unit)
                      • Set Knockbackedunitspoint[(Integer A)] = (Position of (Picked unit))
                      • Set Knockbackdegrees2[(Integer A)] = (Angle from Knockbacktargetpoint[(Integer A)] to Knockbackedunitspoint[(Integer A)])
                      • Set Knockbackunitspoint[(Integer A)] = (Knockbackedunitspoint[(Integer A)] offset by 10.00 towards Knockbackdegrees2[(Integer A)] degrees)
                      • Unit - Turn collision for (Picked unit) Off
                      • Unit - Move (Picked unit) instantly to Knockbackunitspoint[(Integer A)]
                      • Unit - Cause Knockbackcasting[(Integer A)] to damage Knockbacktarget[(Integer A)], dealing 0.00 damage of attack type Chaos and damage type Normal
                      • Unit - Cause Knockbackcasting[(Integer A)] to damage (Picked unit), dealing 0.00 damage of attack type Chaos and damage type Normal
                      • Special Effect - Create a special effect at Knockbackedunitspoint[(Integer A)] using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
                      • Set Smokeeffect = (Last created special effect)
                      • Special Effect - Destroy Smokeeffect
                      • Custom script: call RemoveLocation( udg_Knockbackedunitspoint[GetForLoopIndexA()] )
                      • Custom script: call RemoveLocation ( udg_Knockbackedunitspoint[GetForLoopIndexA()] )
                    • Else - Actions
                      • Do nothing
              • Set Kinterger[(Integer A)] = (Kinterger[(Integer A)] + 1)
            • Else - Actions
              • Unit Group - Pick every unit in Knockbackedunits[(Integer A)] and do (Unit - Turn collision for (Picked unit) On)
              • Unit - Turn collision for Knockbacktarget[(Player number of (Owner of (Casting unit)))] On
              • Set Knockbacktarget[(Integer A)] = No unit
              • Custom script: call RemoveLocation( udg_Knockbackpoint[GetForLoopIndexA()] )
              • Set Kinterger[(Integer A)] = Kinterger[((Integer A) + 1)]
          • Custom script: call RemoveLocation( udg_Knockbacktargetpointcheck2[GetForLoopIndexA()] )
          • Custom script: call RemoveLocation( udg_Knockbacktargetpointcheck[GetForLoopIndexA()] )
          • Visibility - Destroy (Last created visibility modifier)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top