• 🏆 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] what the hell, i see no logic why its not creating the unit??

Status
Not open for further replies.
Level 20
Joined
Jan 6, 2008
Messages
2,627
Okay, tell me what i do wrong? the effect works excellent, but the units NOT spawning....

  • Call from the Death
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Call from the Death
    • Actions
      • Custom script: local effect udg_TempFX
      • Custom script: local group udg_TempGroup
      • Custom script: local location udg_TempLoc
      • Custom script: local unit udg_TempCaster
      • Set TempCaster = (Triggering unit)
      • Set TempLoc = (Target point of ability being cast)
      • Special Effect - Create a special effect at TempLoc using war3mapImported\GrudgeAura.mdx
      • Set TempFX = (Last created special effect)
      • Set TempGroup = (Units within 200.00 of TempLoc)
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) belongs to an enemy of (Owner of TempCaster)) Equal to True
              • ((Picked unit) is Magic Immune) Not equal to True
              • ((Picked unit) has buff Invulnerable) Not equal to True
            • Then - Actions
              • Unit - Create 1 Ghoul for (Owner of TempCaster) at (Position of (Picked unit)) facing (Facing of (Picked unit)) degrees
              • Set Dummy = (Last created unit)
              • Unit - Add a 3.00 second Generic expiration timer to Dummy
              • Unit - Order Dummy to Attack (Picked unit)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of Call from the Death for TempCaster) Equal to CallfromtheDeadLevels[2]
                • Then - Actions
                  • Unit - Create 1 Ghoul for (Owner of TempCaster) at (Position of (Picked unit)) facing (Facing of (Picked unit)) degrees
                  • Set Dummy = (Last created unit)
                  • Unit - Add a 3.00 second Generic expiration timer to Dummy
                  • Unit - Order Dummy to Attack (Picked unit)
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of Call from the Death for TempCaster) Equal to CallfromtheDeadLevels[3]
                • Then - Actions
                  • Unit - Create 1 Ghoul for (Owner of TempCaster) at (Position of (Picked unit)) facing (Facing of (Picked unit)) degrees
                  • Set Dummy = (Last created unit)
                  • Unit - Add a 3.00 second Generic expiration timer to Dummy
                  • Unit - Order Dummy to Attack (Picked unit)
                • Else - Actions
            • Else - Actions
      • Wait 3.00 seconds
      • Special Effect - Destroy TempFX
      • Custom script: call RemoveLocation(udg_TempLoc)
      • Custom script: call DestroyGroup(udg_TempGroup)
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Local and udg_ don't mix with the 1.24 patch.

Shadowing globals with locals shouldn't be possible. Just replace all udg_something with...something else, don't use a global variable name.

For example:

local group udg_TempGroup

->

local group g

This is assuming you don't have a global group named g created.

Also

  • Unit - Create 1 Ghoul for (Owner of TempCaster) at (Position of (Picked unit)) facing (Facing of (Picked unit)) degrees
Doesn't this leak the position?
 
Level 8
Joined
Nov 20, 2008
Messages
445
He wont have any use if he does that. He is doing the shadowing in the first place so he can use locals in GUI and not just to have a local variable sittin there lookin pretty at the top.
 
Level 20
Joined
Jan 6, 2008
Messages
2,627
well, the loc leak, ill fix that in a min

and the locals works

EDIT:

  • Call from the Death
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Call from the Death
    • Actions
      • Custom script: local effect udg_TempFX
      • Custom script: local group udg_TempGroup
      • Custom script: local location udg_TempLoc
      • Custom script: local unit udg_TempCaster
      • Set TempCaster = (Triggering unit)
      • Set TempLoc = (Target point of ability being cast)
      • Special Effect - Create a special effect at TempLoc using war3mapImported\GrudgeAura.mdx
      • Set TempFX = (Last created special effect)
      • Set TempGroup = (Units within 200.00 of TempLoc)
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • For each (Integer A) from 1 to 3, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked unit) belongs to an enemy of (Owner of TempCaster)) Equal to True
                  • ((Picked unit) is Magic Immune) Not equal to True
                  • ((Picked unit) has buff Invulnerable) Not equal to True
                  • (Level of Call from the Death for TempCaster) Equal to CallfromtheDeadLevels[(Integer A)]
                • Then - Actions
                  • Set Loc2 = (Position of (Picked unit))
                  • Unit - Create 1 CallFromTheDeadUnits[(Integer A)] for (Owner of TempCaster) at (Position of (Picked unit)) facing (Facing of (Picked unit)) degrees
                  • Set Dummy = (Last created unit)
                  • Unit - Add a 5.00 second Generic expiration timer to Dummy
                  • Unit - Order Dummy to Attack (Picked unit)
                  • Custom script: call RemoveLocation(udg_Loc2)
                • Else - Actions
      • Wait 3.00 seconds
      • Special Effect - Destroy TempFX
      • Custom script: call RemoveLocation(udg_TempLoc)
      • Custom script: call DestroyGroup(udg_TempGroup)

Still not working


EDIT: I dont know why, but it was because i Local'ed Tempcaster...
 
Status
Not open for further replies.
Top