• 🏆 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] Mui

Status
Not open for further replies.
Level 6
Joined
Nov 24, 2012
Messages
198
I making trigger like this:
  • Experiment Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Attach = origin
      • Set SPecial[1] = Abilities\Spells\Other\Doom\DoomDeath.mdl
      • Set SPecial[2] = Abilities\Spells\Other\Incinerate\FireLordDeathExplode.mdl
  • Experiment Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Experiment
    • Actions
      • Set MaxIndex = (MaxIndex + 1)
      • Set TempUnit[MaxIndex] = (Triggering unit)
      • Set TempPoint[MaxIndex] = (Position of TempUnit[MaxIndex])
      • Set Number[1] = (Facing of TempUnit[MaxIndex])
      • Set Number[2] = 50.00
      • Set Angle = 90.00
      • Trigger - Turn on Experiment Effect <gen>
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • MaxIndex Equal to 1
        • Then - Actions
          • Trigger - Turn on Experiment Loop <gen>
        • Else - Actions
      • Special Effect - Create a special effect attached to the Attach of TempUnit[MaxIndex] using SPecial[2]
      • Set SFX[1] = (Last created special effect)
      • Special Effect - Create a special effect attached to the Attach of TempUnit[MaxIndex] using SPecial[1]
      • Set SFX[2] = (Last created special effect)
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Unit - Create 1 Dummy for Neutral Passive at ((Position of TempUnit[MaxIndex]) offset by Number[2] towards Angle degrees) facing Angle degrees
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
          • Set Number[2] = (Number[2] + 40.00)
          • Set DummyFlameA[(Integer A)] = (Last created unit)
      • Set Angle = (Angle + 72.00)
      • Set Number[2] = 50.00
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Unit - Create 1 Dummy for Neutral Passive at ((Position of TempUnit[MaxIndex]) offset by Number[2] towards Angle degrees) facing Angle degrees
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
          • Set Number[2] = (Number[2] + 40.00)
          • Set DummyFlameB[(Integer A)] = (Last created unit)
      • Set Angle = (Angle + 72.00)
      • Set Number[2] = 50.00
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Unit - Create 1 Dummy for Neutral Passive at ((Position of TempUnit[MaxIndex]) offset by Number[2] towards Angle degrees) facing Angle degrees
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
          • Set Number[2] = (Number[2] + 40.00)
          • Set DummyFlameC[(Integer A)] = (Last created unit)
      • Set Angle = (Angle + 72.00)
      • Set Number[2] = 50.00
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Unit - Create 1 Dummy for Neutral Passive at ((Position of TempUnit[MaxIndex]) offset by Number[2] towards Angle degrees) facing Angle degrees
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
          • Set Number[2] = (Number[2] + 40.00)
          • Set DummyFlameD[(Integer A)] = (Last created unit)
      • Set Angle = (Angle + 72.00)
      • Set Number[2] = 50.00
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Unit - Create 1 Dummy for Neutral Passive at ((Position of TempUnit[MaxIndex]) offset by Number[2] towards Angle degrees) facing Angle degrees
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
          • Set Number[2] = (Number[2] + 40.00)
          • Set DummyFlameE[(Integer A)] = (Last created unit)
      • Set Number[2] = 95.00
  • Experiment Loop
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer CurrentIndex) from 1 to MaxIndex, do (Actions)
        • Loop - Actions
          • Set TempGroup[1] = (Units within 200.00 of TempPoint[CurrentIndex] matching (((Matching unit) belongs to an enemy of (Owner of TempUnit[CurrentIndex])) Equal to True))
          • Unit Group - Pick every unit in TempGroup[1] and do (Actions)
            • Loop - Actions
              • Unit - Cause TempUnit[CurrentIndex] to damage (Picked unit), dealing 300.00 damage of attack type Spells and damage type Fire
          • Custom script: call DestroyGroup(udg_TempGroup[1])
          • Set TempGroup[2] = (Units within 300.00 of TempPoint[CurrentIndex] matching (((Matching unit) belongs to an enemy of (Owner of TempUnit[CurrentIndex])) Equal to True))
          • Unit Group - Pick every unit in TempGroup[2] and do (Actions)
            • Loop - Actions
              • Unit - Cause TempUnit[CurrentIndex] to damage (Picked unit), dealing 300.00 damage of attack type Spells and damage type Fire
          • Custom script: call DestroyGroup(udg_TempGroup[2])
          • Custom script: call RemoveLocation(udg_TempPoint[udg_CurrentIndex])
          • Special Effect - Destroy SFX[1]
          • Special Effect - Destroy SFX[2]
          • Set TempPoint[CurrentIndex] = TempPoint[MaxIndex]
          • Set TempUnit[CurrentIndex] = TempUnit[MaxIndex]
          • Set MaxIndex = (MaxIndex - 1)
          • Set CurrentIndex = (CurrentIndex - 1)
          • Set Number[2] = 50.00
          • Set Angle = 90.00
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • MaxIndex Equal to 0
            • Then - Actions
              • Trigger - Turn off (This trigger)
              • Trigger - Turn off Experiment Effect <gen>
            • Else - Actions
  • Experiment Effect
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Set Number[1] = (Number[1] + 15.00)
      • Special Effect - Create a special effect at ((Position of TempUnit[MaxIndex]) offset by 300.00 towards Number[1] degrees) using SPecial[1]
      • Special Effect - Destroy (Last created special effect)
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 300.00 of (Position of TempUnit[MaxIndex]) matching (((Matching unit) belongs to an enemy of (Owner of TempUnit[MaxIndex])) Equal to True)) and do (Actions)
        • Loop - Actions
          • Unit - Cause TempUnit[MaxIndex] to damage (Picked unit), dealing 10.00 damage of attack type Spells and damage type Fire
And if unit casting it the fire not surround the caster?
And post the trigger please
 
Last edited:
Level 13
Joined
Mar 29, 2012
Messages
530
My suggestion :
Just create variable with type point and replace all point variable that currently used with the new variable point (but don't create point variable with arrays !).

e.g TempLoc, TempLoc2, TempPoint, TempPoint2.
Don't create like this :
Temp_Point[<array size>]

It'll takes many spaces !

Also, I suggest you use Spell Indexer by Almia (Radamantus)
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
My suggestion :
Just create variable with type point and replace all point variable that currently used with the new variable point (but don't create point variable with arrays !).

e.g TempLoc, TempLoc2, TempPoint, TempPoint2.
Don't create like this :
Temp_Point[<array size>]

It'll takes many spaces !

thats not true
arrays are allocated dynamically in powers of 2 and all allocated space is null by default so as long as he doesnt use index 4096+ he is fine and still, those points will take no space becaus they all have same value - null
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
when you try to use index over 4096 syst will allocate additional store up to 8192 to ensure you have the size, but if hoghest index you use is lest say 10, the array size is 16
it allocates closest bigger power of 2, thats why its enough to use index 4097 to get all 8192 indexes allocated
 
Status
Not open for further replies.
Top