[Request] Spell - Wildfire

N(O.O)B

New Member
Reaction score
27
May I ask what you use the local variable "u" for? you set it and wait 2 seconds, then remove it? :O

He uses it to remove the dummy unit, but he should add an expiration timer to it. Not to mention that because he used a local variable it leaks now, as he didn't do
Trigger:
  • Custom script: set u = null

At the end of the trigger.
 

jomik

New Member
Reaction score
17
Ohh yeah I didn't see it was RemoveUnit :p well yeah, that makes no sense at all :O lol .P
 

Bogrim

y hello thar
Reaction score
154
This is only true if you store values in global variables before the wait, and use them after the wait. Using (Triggering Unit) after a wait will not change whether the spell is MUI or not, neither will using local variables. The real question is, why did Bogrim use a local variable when you might as well just add an expiration timer to the unit for the same effect? :nuts:
Try reading the event responses? :rolleyes: If I used an expiration timer, the trigger would create an infinite loop after the first unit expires. The RemoveUnit action is specifically meant to kill the unit without triggering the trigger a second time.

But I didn't know single local unit variables leaked, so you have taught me something again! Ensabahnur, just add N(O.O)B's custom script at the end of the trigger to fix the leak. There's nothing else wrong with the trigger.

It would be a much smoother trigger if you could detect the summoning of the unit, but there are some summon spells which the WE neglects to detect. You could also go another path and just create a seperate dummy unit, while this trigger basically just reuses the same unit as a dummy unit. There’s no difference but in how you destroy the dummy unit.
 

NoobImbaPro

You can change this now in User CP.
Reaction score
60
kingkwong92@
(the level of ability+2 makes 1 more bounce than the man wants)


Here is the hole trigger
so I made that. Bugs fixed
Create 2 same abilities! 1 for caster and replace it at "Set WF_A = Firebolt (Neutral Hostile)"
and 1 for dummy and replace the "Set WF_Du = Peasant" with the dummy type you want.
And for the order find the base name of it and replace it at "Unit - Order (Last created unit) to [-->Neutral - Firebolt<--] WF_T[(Integer A)]"
NO buff checks needed.
Trigger:
  • Stables
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set WF_A = Firebolt (Neutral Hostile)
      • Set WF_Du = Peasant
      • Set InstanceMax = 50

Trigger:
  • DmgInit1
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set TmpGroup = (Units in (Playable map area))
      • Unit Group - Pick every unit in TmpGroup and do (Actions)
        • Loop - Actions
          • Unit Group - Add (Picked unit) to CG
          • Trigger - Add to Check &lt;gen&gt; the event (Unit - (Picked unit) Takes damage)
      • Custom script: call DestroyGroup (udg_TmpGroup)

Trigger:
  • DmgInit2
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • ((Triggering unit) is in CG) Not equal to True
    • Actions
      • Unit Group - Add (Triggering unit) to CG
      • Trigger - Add to Check &lt;gen&gt; the event (Unit - (Triggering unit) Takes damage)

Trigger:
  • WF Init
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to WF_A
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Instance Equal to InstanceMax
        • Then - Actions
          • Set Instance = 1
        • Else - Actions
          • Set Instance = (Instance + 1)
      • Set WF_B[Instance] = ((Level of WF_A for (Triggering unit)) + 1)
      • Set WF_C[Instance] = (Triggering unit)
      • Set WF_T[Instance] = (Target unit of ability being cast)
      • Set WF_D[Instance] = 10.00
      • Unit Group - Add WF_C[Instance] to BG

Trigger:
  • Check
    • Events
    • Conditions
      • (Triggering unit) Not equal to (Damage source)
      • ((Triggering unit) belongs to an ally of (Owner of (Damage source))) Equal to False
      • (Damage taken) Greater than 1.00
    • Actions
      • For each (Integer A) from 1 to InstanceMax, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Damage source) is in BG) Equal to True
              • (Triggering unit) Equal to WF_T[(Integer A)]
              • (Damage source) Equal to WF_C[(Integer A)]
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • WF_B[(Integer A)] Equal to 0
                • Then - Actions
                  • Set WF_C[(Integer A)] = No unit
                  • Set WF_T[(Integer A)] = No unit
                  • Unit Group - Remove WF_T[(Integer A)] from WF_G
                • Else - Actions
                  • Unit Group - Remove WF_C[(Integer A)] from BG
                  • Unit Group - Add WF_T[(Integer A)] to WF_G
                  • Set WF_B[(Integer A)] = (WF_B[(Integer A)] - 1)
            • Else - Actions

Trigger:
  • Check2
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to InstanceMax, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (WF_T[(Integer A)] is in WF_G) Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • WF_D[(Integer A)] Greater than 0.00
                  • (WF_T[(Integer A)] is alive) Equal to True
                • Then - Actions
                  • Set WF_D[(Integer A)] = (WF_D[(Integer A)] - 0.10)
                • Else - Actions
                  • Unit Group - Remove WF_T[(Integer A)] from WF_G
                  • Set TmpPoint = (Position of WF_T[(Integer A)])
                  • Set TmpGroup = (Units within 700.00 of temp_location matching ((((Matching unit) belongs to an enemy of (Owner of (Dying unit))) Equal to True) and ((((Matching unit) is alive) Equal to True))
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Number of units in TmpGroup) Greater than 0
                    • Then - Actions
                      • Set WF_T[(Integer A)] = (Random unit from TmpGroup)
                      • Set WF_D[(Integer A)] = 10.00
                      • Unit - Create 1 WF_Du for (Owner of WF_C[(Integer A)]) at TmpPoint facing Default building facing degrees
                      • Set WF_C[(Integer A)] = (Last created unit)
                      • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
                      • Unit - Order (Last created unit) to Neutral - Firebolt WF_T[(Integer A)]
                      • Unit Group - Add WF_C[Instance] to BG
                    • Else - Actions
                      • Set WF_C[(Integer A)] = No unit
                      • Set WF_T[(Integer A)] = No unit
                      • Unit Group - Remove WF_T[(Integer A)] from WF_G
                  • Custom script: call DestroyGroup (udg_TmpGroup)
                  • Custom script: call RemoveLocation (udg_TmpPoint)
            • Else - Actions



This is not on the map I uploaded because it was tooooooo long!
Trigger:
  • a
    • Set TmpGroup = (Units within 700.00 of temp_location matching ((((Matching unit) belongs to an enemy of (Owner of (Dying unit))) Equal to True) and ((((Matching unit) is alive) Equal to True))
 
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