• 🏆 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!

[Trigger] Abduction is off... :(

Status
Not open for further replies.
Level 8
Joined
Apr 7, 2008
Messages
176
For some reason before the saucer reaches its bottom height (300) the target starts going upwards... I dont see how. Can someone understand this and see if there is anything wrong? Please


  • Abduction Action
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • -------- Here is how MUI works, since basically our caster variable is a 0 to start off and then becomes 1 then 2, etc. this cycles throught those and does actions for the select units --------
      • For each (Integer Inter_A) from 0 to (AB_Cast_Number - 1), do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Current flying height of Saucer_Unit[Inter_A]) Greater than or equal to 300.00) and ((AB_Target_Unit[Inter_A] is alive) Equal to False)
            • Then - Actions
              • -------- If the saucer is above 300 FH and the target is alive, moves the UFO downward. --------
              • Animation - Change Saucer_Unit[Inter_A] flying height to ((Current flying height of Saucer_Unit[Inter_A]) + 10.00) at 0.00
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Current flying height of Saucer_Unit[Inter_A]) Equal to 300.00
                  • And - All (Conditions) are true
                    • Conditions
                      • (AB_Target_Unit[Inter_A] is alive) Equal to True
                • Then - Actions
                  • -------- This is the problem area, I dont not know why this is happening early. I --------
                  • -------- Supposed to be that if the UFO's FH is exactly 300 then the target begins moving upward. but it doesnt work that way. --------
                  • Animation - Change AB_Target_Unit[Inter_A] flying height to ((Current flying height of AB_Target_Unit[Inter_A]) + 2.00) at 0.00
                  • -------- Plays the Tractor beam's Birth animation of the model file I assigned it. Remember we assigned the unit to a variable owned by a casting unit. --------
                  • Animation - Play Tractor_Beam[Inter_A]'s birth animation
                • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Current flying height of AB_Target_Unit[Inter_A]) Equal to 300.00
              • (AB_Target_Unit[Inter_A] is alive) Equal to True
            • Then - Actions
              • -------- WHen the target reaches the UFO the Tractor Beam (Turns off) and we hide the target so there is no dead body floating there. --------
              • Unit - Remove Tractor_Beam[Inter_A] from the game
              • Unit - Remove ShipWarp[Inter_A] from the game
              • Unit - Hide AB_Target_Unit[Inter_A]
              • -------- Here you can change it to just "Kill Unit" if you dont want heroes getting XP for it. That's all that should be changed though. --------
              • Unit - Cause AB_Caster[Inter_A] to damage AB_Target_Unit[Inter_A], dealing 9999999.00 damage of attack type Chaos and damage type Normal
              • -------- Now it becomes unpaused to allow it to decay, and if happens to be revived in a map it will be playable again. --------
              • Unit - Unpause AB_Target_Unit[Inter_A]
              • -------- Added this to avoid reviving a hovering unit. Dunno if it would happen, just being cautious. --------
              • Animation - Change AB_Target_Unit[Inter_A] flying height to 0.00 at 0.00
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Current flying height of Saucer_Unit[Inter_A]) Greater than 900.00
              • (AB_Target_Unit[Inter_A] is alive) Equal to False
            • Then - Actions
              • -------- Now that the UFO has its target and has been ordered to return home, when it reaches an area that is understandably out of sight it is removed. No reason to keep it around. --------
              • Unit - Remove Saucer_Unit[Inter_A] from the game
              • Unit - Create 1 Ship Warp for (Owner of (Triggering unit)) at AB_Target[AB_Cast_Number] facing Default building facing degrees
              • Set ShipWarp[Inter_A] = (Last created unit)
              • Unit - Kill (Last created unit)
              • -------- Custom script that removes location leaks. Location leaks are the area of the target, these are stored by the game cache (unless removed like this) and then dumped at the end, The reason for sometimes having a long loading screen at the end of a game. --------
              • Custom script: call RemoveLocation(udg_AB_Target[udg_Inter_A])
              • -------- Now that the saucer is gone this is now reduced by 1 if this becomes 0 again it turns off this trigger, no reason to have a trigger firing every .03 seconds for nothing. --------
              • Set Saucer_Duration = (Saucer_Duration - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Saucer_Duration Equal to 0
                • Then - Actions
                  • -------- Sets Cast number back to 0 so that this trigger is turned back on next time the spell is cast. --------
                  • Set AB_Cast_Number = 0
                  • Trigger - Turn off Abduction Action <gen>
                • Else - Actions
            • Else - Actions
If you want the rest of the triggers, if it dont make sense or something, the map is on the bottom. of the post.
 
Last edited:
Level 11
Joined
May 31, 2008
Messages
698
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
(AB_Target_Unit[Inter_A] is alive) Equal to True
(Current flying height of Saucer_Unit[Inter_A]) Equal to 300.00

Do like that see if it works idk
Also are you sure that the flying height of the ufo isnt 300? maybe it is but you dont know cuz there isnt rly a way to tell.
 
Status
Not open for further replies.
Top