• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Spell bugs, Noone knows.... >.>

Status
Not open for further replies.
Level 9
Joined
Apr 7, 2008
Messages
176
Ok I've made a new thread since the old one got all chopped up.

What I have here is My spell Im working on. It looks to work BUT, when a unit casts the spell while another units ship is moving UPward, it bugs out. Freezing the whole trigger.
So far I have narrowed it down to the Order Number (I believe). It has messages in there to see what part of the trigger is running. Can someone please figure out where this is breaking? I have been staring at it for a week now, changing stuff around but still gettting the same result.

Below is a copy of the map to test it urself.

  • Abduction Spell Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Alien Massacre
    • Actions
      • -------- NOTHING HERE SHOULD BE CHANGED --------
      • Set AB_Target[AB_Cast_Number] = (Target point of ability being cast)
      • -------- Sets the level of the UFO's Lasers = to the level of the hero's Spell. --------
      • Set AB_Level[AB_Cast_Number] = (Level of (Ability being cast) for (Triggering unit))
      • -------- Creates a FLying Saucer and smaller UFO's inside the MS and puts them in a group above target unit. And then sets the created units into a Variable. --------
      • Unit - Create 1 Mother Ship for (Owner of (Triggering unit)) at AB_Target[AB_Cast_Number] facing AB_Target[AB_Cast_Number]
      • Set Saucer_Unit[AB_Cast_Number] = (Last created unit)
      • Unit Group - Add (Last created unit) to TU_Group[AB_Cast_Number]
      • Unit - Create 1 Tiny UFO for (Owner of (Triggering unit)) at AB_Target[AB_Cast_Number] facing Default building facing degrees
      • Set TinyUFO1[AB_Cast_Number] = (Last created unit)
      • Unit Group - Add (Last created unit) to TU_Group[AB_Cast_Number]
      • Unit - Create 1 Tiny UFO for (Owner of (Triggering unit)) at AB_Target[AB_Cast_Number] facing Default building facing degrees
      • Set TinyUFO2[AB_Cast_Number] = (Last created unit)
      • Unit Group - Add (Last created unit) to TU_Group[AB_Cast_Number]
      • Unit - Create 1 Tiny UFO for (Owner of (Triggering unit)) at AB_Target[AB_Cast_Number] facing Default building facing degrees
      • Set TinyUFO3[AB_Cast_Number] = (Last created unit)
      • Unit Group - Add (Last created unit) to TU_Group[AB_Cast_Number]
      • Unit - Create 1 Tiny UFO for (Owner of (Triggering unit)) at AB_Target[AB_Cast_Number] facing Default building facing degrees
      • Set TinyUFO4[AB_Cast_Number] = (Last created unit)
      • Unit Group - Add (Last created unit) to TU_Group[AB_Cast_Number]
      • -------- Setup Caster variable for next caster. --------
      • Set AB_Cast_Number = (AB_Cast_Number + 1)
      • -------- Turns on Action trigger to make the rest of the stuff happen. Only happens if no other UFO's are existing. --------
      • If ((Abduction Action <gen> is on) Equal to False) then do (Trigger - Turn on Abduction Action <gen>) else do (Do nothing)
  • 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 --------
      • Game - Display to (All players) the text: Action Trigger On
      • For each (Integer Inter_A) from 0 to (AB_Cast_Number - 1), do (Actions)
        • Loop - Actions
          • Set MS_Duration[Inter_A] = (MS_Duration[Inter_A] - 1)
          • Game - Display to (All players) the text: Running (udg_Inter_...
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Order_Number[Inter_A] Equal to 0
              • (Current flying height of Saucer_Unit[Inter_A]) Greater than or equal to 300.00
            • Then - Actions
              • Unit Group - Pick every unit in TU_Group[Inter_A] and do (Actions)
                • Loop - Actions
                  • Game - Display to (All players) the text: Saucers Down
                  • Animation - Change (Picked unit) flying height to ((Current flying height of (Picked unit)) - 5.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]) Less than or equal to 300.00
                  • Order_Number[Inter_A] Equal to 0
                  • (Distance between (Position of TinyUFO1[Inter_A]) and AB_Target[Inter_A]) Less than 1000.00
                • Then - Actions
                  • Game - Display to (All players) the text: Saucers Out
                  • Set Order_Number[Inter_A] = (Order_Number[Inter_A] + 1)
                  • Set TU_Point[T1[Inter_A]] = ((Position of TinyUFO1[Inter_A]) offset by 1050.00 towards 45.00 degrees)
                  • Unit - Order TinyUFO1[Inter_A] to Move To TU_Point[T1[Inter_A]]
                  • Unit - Add UFO Laser to TinyUFO1[Inter_A]
                  • Unit - Set level of UFO Laser for TinyUFO1[Inter_A] to AB_Level[AB_Cast_Number]
                  • -------- 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_TU_Point[udg_T1[udg_Inter_A]])
                  • Set TU_Point[T2[Inter_A]] = ((Position of TinyUFO2[Inter_A]) offset by 1000.00 towards 135.00 degrees)
                  • Unit - Order TinyUFO2[Inter_A] to Move To TU_Point[T2[Inter_A]]
                  • Unit - Add UFO Laser to TinyUFO2[Inter_A]
                  • Unit - Set level of UFO Laser for TinyUFO2[Inter_A] to AB_Level[AB_Cast_Number]
                  • Custom script: call RemoveLocation(udg_TU_Point[udg_T2[udg_Inter_A]])
                  • Set TU_Point[T3[Inter_A]] = ((Position of TinyUFO3[Inter_A]) offset by 1000.00 towards 225.00 degrees)
                  • Unit - Order TinyUFO3[Inter_A] to Move To TU_Point[T3[Inter_A]]
                  • Unit - Add UFO Laser to TinyUFO3[Inter_A]
                  • Unit - Set level of UFO Laser for TinyUFO3[Inter_A] to AB_Level[AB_Cast_Number]
                  • Custom script: call RemoveLocation(udg_TU_Point[udg_T3[udg_Inter_A]])
                  • Set TU_Point[T4[Inter_A]] = ((Position of TinyUFO4[Inter_A]) offset by 1000.00 towards 315.00 degrees)
                  • Unit - Order TinyUFO4[Inter_A] to Move To TU_Point[T4[Inter_A]]
                  • Unit - Add UFO Laser to TinyUFO4[Inter_A]
                  • Unit - Set level of UFO Laser for TinyUFO4[Inter_A] to AB_Level[AB_Cast_Number]
                  • Custom script: call RemoveLocation(udg_TU_Point[udg_T4[udg_Inter_A]])
                • 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]) Less than or equal to 300.00
                      • Order_Number[Inter_A] Equal to 1
                      • (Distance between (Position of TinyUFO1[Inter_A]) and AB_Target[Inter_A]) Greater than 1000.00
                    • Then - Actions
                      • Game - Display to (All players) the text: Saucers In
                      • Set Order_Number[Inter_A] = (Order_Number[Inter_A] + 1)
                      • Unit - Order TinyUFO1[Inter_A] to Move To AB_Target[Inter_A]
                      • Unit - Order TinyUFO2[Inter_A] to Move To AB_Target[Inter_A]
                      • Unit - Order TinyUFO3[Inter_A] to Move To AB_Target[Inter_A]
                      • Unit - Order TinyUFO4[Inter_A] to Move To AB_Target[Inter_A]
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Order_Number[Inter_A] Equal to 2
                          • (Distance between (Position of TinyUFO1[Inter_A]) and AB_Target[Inter_A]) Less than 75.00
                        • Then - Actions
                          • Unit Group - Pick every unit in TU_Group[Inter_A] and do (Actions)
                            • Loop - Actions
                              • Game - Display to (All players) the text: Saucers Up
                              • -------- If the saucer is above 300 FH and the target is alive, moves the UFO downward. --------
                              • Animation - Change (Picked unit) flying height to ((Current flying height of (Picked unit)) + 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]) Greater than 900.00
              • Order_Number[Inter_A] Equal to 2
            • 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 Group - Pick every unit in TU_Group[Inter_A] and do (Actions)
                • Loop - Actions
                  • Game - Display to (All players) the text: Remove Saucers
                  • Unit - Remove (Picked unit) from the game
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in (Units of type Mother Ship)) Less than 1
        • Then - Actions
          • For each (Integer Inter_A) from 0 to (AB_Cast_Number - 1), do (Actions)
            • Loop - Actions
              • Game - Display to (All players) the text: Set Order_# = 0 Re...
              • Set Order_Number[Inter_A] = 0
              • Custom script: call RemoveLocation(udg_AB_Target[udg_Inter_A])
          • Game - Display to (All players) the text: Action Trigger OFF
          • Set AB_Cast_Number = 0
          • Trigger - Turn off (This trigger)
        • Else - Actions
Noone has any ideas??? wow
 

Attachments

  • MotherSHip 1.w3x
    53.1 KB · Views: 38
Last edited by a moderator:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
Ok, the bug is related to MUI. The way the spell is MUI currently bugs if cast more than once at the same time.
It is obviously related to unit removal or something of the kind. I recommend rechecking your MUI logic as no doubt the source of the problem is with that.
 
Level 9
Joined
Apr 7, 2008
Messages
176
I have looked it over again and again. The only person to say they knew what was wrong with it, was wrong. I figured there are those of you that have been doing this stuff for years now and thought someone could tell me WHAT the problem is. I know WHERE it is. And sort of WHAT it is, only so far from what i've been told,
The things I've done here arent supposed to be able to happen, while the rest of what should be working isn't.....
I guess it's time to hang up the GUI hat and put on a new one. Jass im coming for you.
 
Status
Not open for further replies.
Top