🏆 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!
Set ABGroup = (Units within 450.00 of ABCastPoint matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of ABCaster)) Equal to True))))
Unit Group - Pick every unit in ABGroup and do (Actions)
Loop - Actions
Set ABPicked = (Position of (Picked unit))
Unit - Create 1 (Unit-type of (Picked unit)) for (Owner of ABCaster) at Unit_Loc facing Default building facing degrees
Set ABDummy[1] = (Last created unit)
Unit - Add a 3.00 second Generic expiration timer to ABDummy[1]
Animation - Change ABDummy[1]'s vertex coloring to (0.00%, 100.00%, 100.00%) with 20.00% transparency
Unit - Add Arcane Blast (Ethereal Copy) to ABDummy[1]
Unit - Set level of Arcane Blast (Ethereal Copy) for ABDummy[1] to (Level of Arcane Blast for Caster)
-- General Information --
Slowest all units beetwen caster and create ethereal copy of each.
It uses the Game - Value Of Real Variable event as its method of activating other triggers, and passes the event responses through a few globals.
-- How To Implement --
Be sure "Automatically create unknown variables while pasting trigger data" is enabled in the World Editor general preferences.
Copy the trigger category "Arcane Blast" from the demo map and paste it into your map. (Alternately: create the variables listed below.) Copy buff and models.
ABPicked is the picked unit, Event Response - Picked Unit.
ABCaster is the caster unit, replacing Event Response - Caster Unit.
ABDummy is the copy unit, Event Response - Last Created Unit.
ABCastPoint is a point of cast, Event Response - Position of Unit.
ABGroup is a unit group, Event Response - Unit Group.
Following there are many leaks:
-First of all the group leaks: you have to set a variable for the group and then pick the units in the variable (and clear).
-Leaks the points, too: you have to set many variables as points and then clear all.
I will show you how to fix that all
Also there is a thing that make it not much "MUI" or "MPI" that is the wait...I will show you how to fix leaks first
Unit Group - Pick every unit in (Units within 450.00 of (Position of Caster)) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) has buff Arcane Blast ) Uguale a TRUE
((Picked unit) is Un eroe) Uguale a FALSE
((Picked unit) is Una struttura) Uguale a FALSE
Allora - Azioni
Unit - Create 1 (Unit-type of (Picked unit)) for (Owner of Caster) at (Position of (Picked unit)) facing (Facing of (Picked unit)) degrees
Unit - There are many actions below but they doesn't leak...
Just do it:
Arcane Blast
Events
Unit - A unit ends the launch of an ability
Conditions
(Ability being cast) Uguale a Arcane Blast
Actions
Set Caster = (Casting unit)
Set Point = (Position of Caster)
Set Group = (Units within 450.00 of Point)
Unit Group - Pick every unit in Group and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) has buff Arcane Blast ) Uguale a TRUE
((Picked unit) is Un eroe) Uguale a FALSE
((Picked unit) is Una struttura) Uguale a FALSE
Then - Actions
Set Point2 = (Position of (Picked Unit))
Unit - Create 1 (Unit-type of (Picked unit)) for (Owner of Caster) at Point2 facing (Facing of (Picked unit)) degrees
Custom script: call RemoveLocation(udg_Point2)
Custom script: call RemoveLocation(udg_Point)
Custom script: call DestroyGroup(udg_Group)
To remove the wait you only have to change the EVENT to "A unit ENDS the launch of an ability", and it'll be fine!
I already fixed it to make the review, but I wan't that you fix this, too. I like it, and without leaks and with MUI and MPI it will be fine (it IS fine!). Have fun!
Unit Group - Pick every unit in (Units within 450.00 of (Position of Caster)) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) has buff Arcane Blast ) Equal to True
((Picked unit) is A Hero) Equal to False
((Picked unit) is A structure) Equal to False
Then - Actions
Unit - Create 1 (Unit-type of (Picked unit)) for (Owner of Caster) at (Position of (Picked unit)) facing (Facing of (Picked unit)) degrees
Set EtherealCopy[1] = (Last created unit)
Unit - Add a 3.00 second Generic expiration timer to EtherealCopy[1]
Animation - Change EtherealCopy[1]'s vertex coloring to (0.00%, 100.00%, 100.00%) with 20.00% transparency
Unit - Add Arcane Blast (Ethereal Copy) to EtherealCopy[1]
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Arcane Blast for Caster) Equal to 2
Then - Actions
Unit - Set level of Arcane Blast (Ethereal Copy) for EtherealCopy[1] to 2
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Arcane Blast for Caster) Equal to 3
Then - Actions
Unit - Set level of Arcane Blast (Ethereal Copy) for EtherealCopy[1] to 3
Else - Actions
Do nothing
Else - Actions
Do nothing
This leaks a location, group
Unit - Create 1 (Unit-type of (Picked unit)) for (Owner of Caster) at (Position of (Picked unit)) facing (Facing of (Picked unit)) degrees
This leaks 2 locations
Do nothing
Never add this line anywhere, it only slows down the trigger
This
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Arcane Blast for Caster) Equal to 2
Then - Actions
Unit - Set level of Arcane Blast (Ethereal Copy) for EtherealCopy[1] to 2
Else - Actions
Do nothing
And this
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Arcane Blast for Caster) Equal to 3
Then - Actions
Unit - Set level of Arcane Blast (Ethereal Copy) for EtherealCopy[1] to 3
Else - Actions
Do nothing
Can be changed with
Unit - Set level of Arcane Blast (Ethereal Copy) for EtherealCopy[1] to (Level of Arcane Blast for Caster)
Thus preventing multi usage of IF/THEN/ELSE
At the end, your trigger must look like this:
Arcane Blast
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Arcane Blast
Actions
Set Caster = (Triggering unit)
Set Eth_Location = (Position of Caster)
Set Ethernal_Group = (Units within 450.00 of Eth_Location matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of Caster)) Equal to True))))
Unit Group - Pick every unit in Ethernal_Group and do (Actions)
Loop - Actions
Set Unit_Loc = (Position of (Picked unit))
Unit - Create 1 (Unit-type of (Picked unit)) for (Owner of Caster) at Unit_Loc facing Default building facing degrees
Set EtherealCopy[1] = (Last created unit)
Unit - Add a 3.00 second Generic expiration timer to EtherealCopy[1]
Animation - Change EtherealCopy[1]'s vertex coloring to (0.00%, 100.00%, 100.00%) with 20.00% transparency
Unit - Add Arcane Blast (Ethereal Copy) to EtherealCopy[1]
Unit - Set level of Arcane Blast (Ethereal Copy) for EtherealCopy[1] to (Level of Arcane Blast for Caster)
Other things, fix discription, fix your typos, and add documentation with "Trigger Comments" showing what the trigger actually does.
Also I forgot to mention, you don't need an array veriable for the "EtherealCopy" unit, and also add this after the "Custom script: call RemoveLocation (udg_Unit_Loc)"
Unit Group - Pick every unit in (Units within 450.00 of (Position of Caster)) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) has buff Arcane Blast ) Equal to True
((Picked unit) is A Hero) Equal to False
((Picked unit) is A structure) Equal to False
Then - Actions
Unit - Create 1 (Unit-type of (Picked unit)) for (Owner of Caster) at (Position of (Picked unit)) facing (Facing of (Picked unit)) degrees
Set EtherealCopy[1] = (Last created unit)
Unit - Add a 3.00 second Generic expiration timer to EtherealCopy[1]
Animation - Change EtherealCopy[1]'s vertex coloring to (0.00%, 100.00%, 100.00%) with 20.00% transparency
Unit - Add Arcane Blast (Ethereal Copy) to EtherealCopy[1]
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Arcane Blast for Caster) Equal to 2
Then - Actions
Unit - Set level of Arcane Blast (Ethereal Copy) for EtherealCopy[1] to 2
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Arcane Blast for Caster) Equal to 3
Then - Actions
Unit - Set level of Arcane Blast (Ethereal Copy) for EtherealCopy[1] to 3
Else - Actions
Do nothing
Else - Actions
Do nothing
This leaks a location, group
Unit - Create 1 (Unit-type of (Picked unit)) for (Owner of Caster) at (Position of (Picked unit)) facing (Facing of (Picked unit)) degrees
This leaks 2 locations
Do nothing
Never add this line anywhere, it only slows down the trigger
This
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Arcane Blast for Caster) Equal to 2
Then - Actions
Unit - Set level of Arcane Blast (Ethereal Copy) for EtherealCopy[1] to 2
Else - Actions
Do nothing
And this
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Arcane Blast for Caster) Equal to 3
Then - Actions
Unit - Set level of Arcane Blast (Ethereal Copy) for EtherealCopy[1] to 3
Else - Actions
Do nothing
Can be changed with
Unit - Set level of Arcane Blast (Ethereal Copy) for EtherealCopy[1] to (Level of Arcane Blast for Caster)
Thus preventing multi usage of IF/THEN/ELSE
At the end, your trigger must look like this:
Arcane Blast
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Arcane Blast
Actions
Set Caster = (Triggering unit)
Set Eth_Location = (Position of Caster)
Set Ethernal_Group = (Units within 450.00 of Eth_Location matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of Caster)) Equal to True))))
Unit Group - Pick every unit in Ethernal_Group and do (Actions)
Loop - Actions
Set Unit_Loc = (Position of (Picked unit))
Unit - Create 1 (Unit-type of (Picked unit)) for (Owner of Caster) at Unit_Loc facing Default building facing degrees
Set EtherealCopy[1] = (Last created unit)
Unit - Add a 3.00 second Generic expiration timer to EtherealCopy[1]
Animation - Change EtherealCopy[1]'s vertex coloring to (0.00%, 100.00%, 100.00%) with 20.00% transparency
Unit - Add Arcane Blast (Ethereal Copy) to EtherealCopy[1]
Unit - Set level of Arcane Blast (Ethereal Copy) for EtherealCopy[1] to (Level of Arcane Blast for Caster)
Other things, fix discription, fix your typos, and add documentation with "Trigger Comments" showing what the trigger actually does.
Also I forgot to mention, you don't need an array veriable for the "EtherealCopy" unit, and also add this after the "Custom script: call RemoveLocation (udg_Unit_Loc)"
True, but its still not recommend. If the author know there is a similar effect in wc3 thw advice to use that effect instead of the imported one. A good example could be if you made a fire explosion and you used an imported one instead of the flamestrike effects.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.