• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Destructible is created out of line!

Status
Not open for further replies.
Level 3
Joined
Feb 18, 2009
Messages
38
Hello, first of all, i dont really want to post a screen-shot, but i will if i have to!

i have destructible created i a grid at init, and when a player presses the left arrow, his/her unit will jump left, to the next destructible in the line, i downloaded this jump-spell, and fixed it so that when a player presses the left arrow the unit actually jump.

But the jump-spell-triggers somehow move a point-variable slightly of the grid, and it increases for each jump...

i know its the jump-spell-triggers that is causing this problem, since i disabled them just moved the unit without jumping, and then it workd fine!

and here are the triggers:
  • Left
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (left <gen> contains converter[(Player number of (Triggering player))]) Equal to True
        • Then - Actions
          • Set tmp_group = (Player group((Triggering player)))
          • Game - Display to tmp_group the text: You can't jump left!
          • Custom script: call DestroyForce(udg_tmp_group)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Remaining time for jumptimer[(Player number of (Triggering player))]) Equal to 0.00
            • Then - Actions
              • Set tmp_point2 = (Position of converter[(Player number of (Triggering player))])
              • Set tmp_point = (tmp_point2 offset by 128.00 towards 180.00 degrees)
              • Set JDA_JumpHigh_Distance = 1.00
              • Set JDA_DestroyTrees_Dash = False
              • Set JDA_Collusion = False
              • Set JDA_TargetPoint = tmp_point
              • Set JDA_Unit = converter[(Player number of (Triggering player))]
              • Set JDA_Speed = 5.00
              • Set JDA_SpecialEffect = <Empty String>
              • Set JDA_Animation = walk
              • Set JDA_AnimationSpeed = 0.60
              • Trigger - Run Jump System 1 <gen> (checking conditions)
              • Custom script: call RemoveLocation (udg_tmp_point)
              • Set tmp_point = (tmp_point2 offset by 128.00 towards 180.00 degrees)
              • Destructible - Pick every destructible in (Region centered at tmp_point with size (128.00, 128.00)) and do (Actions)
                • Loop - Actions
                  • Custom script: call RemoveLocation (udg_tmp_point)
                  • Set tmp_point = (Position of (Picked destructible))
                  • Destructible - Remove (Picked destructible)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Triggering player) Equal to Player 1 (Red)
                • Then - Actions
                  • Destructible - Create a Red at tmp_point facing 0.00 with scale 1.00 and variation 0
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Triggering player) Equal to Player 2 (Blue)
                • Then - Actions
                  • Destructible - Create a Blue at tmp_point facing 0.00 with scale 1.00 and variation 0
                • Else - Actions
              • Custom script: call RemoveLocation (udg_tmp_point2)
              • Custom script: call RemoveLocation (udg_tmp_point)
              • Countdown Timer - Start jumptimer[(Player number of (Triggering player))] as a One-shot timer that will expire in 1.20 seconds
            • Else - Actions
the first jump-trigger:
  • Jump System 1
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • JD_Integers[1] Equal to 0
        • Then - Actions
          • Trigger - Turn on Jump System 2 <gen>
        • Else - Actions
      • Set JD_Integers[1] = (JD_Integers[1] + 1)
      • Set JD_Integers[2] = (JD_Integers[2] + 1)
      • Set JD_TempPoint[1] = (Position of JDA_Unit)
      • Set JD_Distances[JD_Integers[2]] = (Distance between JD_TempPoint[1] and JDA_TargetPoint)
      • Set JD_ReachedDistance[JD_Integers[2]] = 0.00
      • Set JD_SpeedUnits[JD_Integers[2]] = JDA_Speed
      • Set JD_Unit[JD_Integers[2]] = JDA_Unit
      • Set JD_Angle[JD_Integers[2]] = (Angle from JD_TempPoint[1] to JDA_TargetPoint)
      • Set JD_Effect[JD_Integers[2]] = JDA_SpecialEffect
      • Set JD_Animations[JD_Integers[2]] = JDA_Animation
      • Set JD_TreesDestroy[JD_Integers[2]] = JDA_DestroyTrees_Dash
      • Set JD_HighSettings[JD_Integers[2]] = (JDA_JumpHigh_Distance x JD_Distances[JD_Integers[2]])
      • Animation - Change JDA_Unit's animation speed to (JDA_AnimationSpeed x 100.00)% of its original speed
      • Animation - Play JDA_Unit's JDA_Animation animation
      • Unit Group - Add JDA_Unit to JD_Group
      • Unit - Add Storm Crow Form to JDA_Unit
      • Unit - Remove Storm Crow Form from JDA_Unit
      • Custom script: call RemoveLocation (udg_JD_TempPoint[1])
      • Custom script: call RemoveLocation (udg_JDA_TargetPoint)

the second jump-trigger:
  • Jump System 2
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • For each (Integer JD_Integers[3]) from 1 to JD_Integers[2], do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (JD_Unit[JD_Integers[3]] is in JD_Group) Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • JD_ReachedDistance[JD_Integers[3]] Less than JD_Distances[JD_Integers[3]]
                • Then - Actions
                  • Animation - Queue JD_Unit[JD_Integers[3]]'s JD_Animations[JD_Integers[3]] animation
                  • Set JD_TempPoint[1] = (Position of JD_Unit[JD_Integers[3]])
                  • Set JD_TempPoint[2] = (JD_TempPoint[1] offset by JD_SpeedUnits[JD_Integers[3]] towards JD_Angle[JD_Integers[3]] degrees)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • JD_TreesDestroy[JD_Integers[3]] Equal to True
                    • Then - Actions
                      • Destructible - Pick every destructible within 150.00 of JD_TempPoint[2] and do (Destructible - Kill (Picked destructible))
                    • Else - Actions
                  • Unit - Move JD_Unit[JD_Integers[3]] instantly to JD_TempPoint[2]
                  • Set JD_ReachedDistance[JD_Integers[3]] = (JD_ReachedDistance[JD_Integers[3]] + JD_SpeedUnits[JD_Integers[3]])
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Random integer number between 1 and 5) Equal to 1
                    • Then - Actions
                      • Special Effect - Create a special effect attached to the chest of JD_Unit[JD_Integers[3]] using JD_Effect[JD_Integers[3]]
                      • Special Effect - Destroy (Last created special effect)
                    • Else - Actions
                  • Set JD_RealTimer[JD_Integers[3]] = (JD_RealTimer[JD_Integers[3]] + (180.00 / (JD_Distances[JD_Integers[3]] / JD_SpeedUnits[JD_Integers[3]])))
                  • Set JD_JumpHigh[JD_Integers[3]] = ((Sin(JD_RealTimer[JD_Integers[3]])) x JD_HighSettings[JD_Integers[3]])
                  • Animation - Change JD_Unit[JD_Integers[3]] flying height to JD_JumpHigh[JD_Integers[3]] at 1000000000.00
                  • Custom script: call RemoveLocation (udg_JD_TempPoint[1])
                  • Custom script: call RemoveLocation (udg_JD_TempPoint[2])
                • Else - Actions
                  • Unit Group - Remove JD_Unit[JD_Integers[3]] from JD_Group
                  • Animation - Change JD_Unit[JD_Integers[3]]'s animation speed to 100.00% of its original speed
                  • Animation - Reset JD_Unit[JD_Integers[3]]'s animation
                  • Set JD_RealTimer[JD_Integers[3]] = 0.00
                  • Set JD_Integers[1] = (JD_Integers[1] - 1)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • JD_Integers[1] Equal to 0
                    • Then - Actions
                      • Set JD_Integers[2] = 0
                      • Trigger - Turn off (This trigger)
                    • Else - Actions
            • Else - Actions
the destructibles are created more and more out of the grid the more i jump and i cant find the problem:banghead:

i really need this trigger to work, becuase its an essential trigger for my map..

Edit: i managed to make the destructibles not created out of grid, however, now it is the unit that is moving out of the grid..
(i updated the triggers)
 
Last edited:
Level 13
Joined
Mar 24, 2010
Messages
950
eh i dont really wanna have to look through all that and it seems no one else does either lol but if you post your map with it and point out the problem i think it would take less time to see the prob and troubleshoot it.
 
Status
Not open for further replies.
Top