- Joined
- Sep 11, 2013
- Messages
- 467
Greetings!
I wish to optimize this trigger that I found on a map because I wish to put this taunt spell in my map on Tiny.
So..
1. This Taunt will give me +1 armor when I cast the spell near an enemy and I don't wish that..
I just want basic Taunt that seems to work fine with this trigger. (Ex:Force all enemy near me to attack me for 3 seconds //Just 1 level)
What should I delete in order to not break the entire trigger and in order to remove that part with +1 armor?
I suspect those 2 custom scripts.. but I am not sure if that is enough..
2. Also, I wish this trigger to not have bugs, but I don't know if is created/optimized properly. (I don't wish my game to crash in the middle of the game because of this trigger)
Please take a look and tell me if is good.
I attached the map in this post
The help will be appreciated!
I wish to optimize this trigger that I found on a map because I wish to put this taunt spell in my map on Tiny.
So..
1. This Taunt will give me +1 armor when I cast the spell near an enemy and I don't wish that..
I just want basic Taunt that seems to work fine with this trigger. (Ex:Force all enemy near me to attack me for 3 seconds //Just 1 level)
What should I delete in order to not break the entire trigger and in order to remove that part with +1 armor?
I suspect those 2 custom scripts.. but I am not sure if that is enough..
-
Custom script: call UnitAddAbility(udg_BC_Unit[1], 'A001')
-
Custom script: call UnitRemoveAbility(udg_BC_Unit[1], 'A001')
2. Also, I wish this trigger to not have bugs, but I don't know if is created/optimized properly. (I don't wish my game to crash in the middle of the game because of this trigger)
Please take a look and tell me if is good.
I attached the map in this post
The help will be appreciated!
-
BC Setup
-
Events
-
Map initialization
-
-
Conditions
-
Actions
-
Hashtable - Create a hashtable
-
Set VariableSet BC_Hashtable = (Last created hashtable)
-
-
-
BC Cast
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Berserker's Call
-
-
Actions
-
Set VariableSet BC_Unit[1] = (Triggering unit)
-
Set VariableSet BC_CasterLoc = (Position of BC_Unit[1])
-
Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units within 375.00 of BC_CasterLoc matching ((((Matching unit) is A structure) Equal to False) and (((Matching unit) belongs to an enemy of (Triggering player).) Equal to True)).) and do (Actions)
-
Loop - Actions
-
Set VariableSet BC_Unit[2] = (Picked unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
BC_Unit[2] Not equal to No unit
-
-
Then - Actions
-
Set VariableSet BC_HandleID = (Key (Picked unit).)
-
Hashtable - Save Handle OfBC_Unit[1] as (Key Caster.) of BC_HandleID in BC_Hashtable.
-
Custom script: call UnitAddAbility(udg_BC_Unit[1], 'A001')
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(BC_Unit[2] is in BC_GroupBC.) Equal to False
-
-
Then - Actions
-
Unit Group - Add BC_Unit[2] to BC_GroupBC
-
Special Effect - Create a special effect attached to the chest of BC_Unit[2] using Abilities\Spells\Other\Incinerate\IncinerateBuff.mdl
-
Set VariableSet BC_SFX = (Last created special effect)
-
Hashtable - Save Handle OfBC_SFX as (Key SFX.) of BC_HandleID in BC_Hashtable.
-
-
Else - Actions
-
-
-
Else - Actions
-
-
-
-
Trigger - Turn on BC Loop <gen>
-
Trigger - Turn on BC Remove <gen>
-
Custom script: call RemoveLocation(udg_BC_CasterLoc)
-
-
-
BC Loop
-
Events
-
Time - Every 0.03 seconds of game time
-
-
Conditions
-
Actions
-
Unit Group - Pick every unit in BC_GroupBC and do (Actions)
-
Loop - Actions
-
Set VariableSet BC_HandleID = (Key (Picked unit).)
-
Set VariableSet BC_Unit[1] = (Load (Key Caster.) of BC_HandleID in BC_Hashtable.)
-
Set VariableSet BC_SFX = (Load (Key SFX.) of BC_HandleID in BC_Hashtable.)
-
Set VariableSet BC_Unit[2] = (Picked unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(BC_Unit[2] has buff Berserker's Call ) Equal to True
-
-
Then - Actions
-
Unit - Order BC_Unit[2] to Attack BC_Unit[1]
-
-
Else - Actions
-
Custom script: call UnitRemoveAbility(udg_BC_Unit[1], 'A001')
-
Unit - Order BC_Unit[2] to Stop.
-
Unit Group - Remove BC_Unit[2] from BC_GroupBC.
-
Special Effect - Destroy BC_SFX
-
Hashtable - Clear all child hashtables of child BC_HandleID in BC_Hashtable.
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Number of units in (Units in (Playable map area))) Equal to 0
-
-
Then - Actions
-
Trigger - Turn off (This trigger)
-
Trigger - Turn off BC Loop <gen>
-
-
Else - Actions
-
-
-
-
-
-
-
-
BC Remove
-
Events
-
Unit - A unit Dies
-
-
Conditions
-
Actions
-
Set VariableSet BC_HandleID = (Key (Triggering unit).)
-
Set VariableSet BC_SFX = (Load (Key SFX.) of BC_HandleID in BC_Hashtable.)
-
Unit Group - Remove (Triggering unit) from BC_GroupBC.
-
Special Effect - Destroy BC_SFX
-
Hashtable - Clear all child hashtables of child BC_HandleID in (Last created hashtable).
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Number of units in (Units in (Playable map area))) Equal to 0
-
-
Then - Actions
-
Trigger - Turn off (This trigger)
-
Trigger - Turn off BC Loop <gen>
-
-
Else - Actions
-
-
-