- Joined
- Aug 19, 2007
- Messages
- 1,380
Hi, I was working on a spell called 'summon traitor' which lets you summon the last creature your hero killed. It has 20 levels, higher levels decrease cooldown and lets you summon more copies of the creature your hero killed.
My problem is that sometimes it works and sometimes it doesn't, so maybe somebody knows how to fix it ?
The spell itself is based of 'summon misha'.
Here are the triggers;
My problem is that sometimes it works and sometimes it doesn't, so maybe somebody knows how to fix it ?
The spell itself is based of 'summon misha'.
Here are the triggers;
-
The Traitor
-
Events
- Unit - A unit owned by Neutral Hostile Dies
-
Conditions
- ((Killing unit) is A Hero) Equal to (==) True
- ((Dying unit) is Summoned) Equal to (==) False
- ((Dying unit) is Mechanical) Equal to (==) False
- ((Dying unit) is Magic Immune) Equal to (==) False
-
Actions
- Set TheTraitor[1] = (Unit-type of (Dying unit))
-
Events
-
Summon Traitor
-
Events
- Unit - A unit Begins casting an ability
-
Conditions
- (Ability being cast) Equal to (==) |cff00ffffSummon Traitor|r
-
Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of |cff00ffffSummon Traitor|r for (Casting unit)) Equal to (==) (Random integer number between 0 and 5)
-
Then - Actions
- Set TEMP_POINT = (Position of (Casting unit))
- Unit - Create 1 TheTraitor[1] for (Owner of (Casting unit)) at TEMP_POINT facing (Random angle) degrees
- Custom script: call RemoveLocation(udg_TEMP_POINT)
- Set TEMP_UNITGROUP = (Units owned by (Owner of (Casting unit)) matching ((Unit-type of (Matching unit)) Equal to (==) TheTraitor[1]))
- Wait 0.10 seconds
-
Unit Group - Pick every unit in TEMP_UNITGROUP and do (Actions)
-
Loop - Actions
- Unit - Add Summoned to (Matching unit)
-
Loop - Actions
- Custom script: call DestroyGroup (udg_TEMP_UNITGROUP)
- Else - Actions
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of |cff00ffffSummon Traitor|r for (Casting unit)) Equal to (==) (Random integer number between 4 and 8)
-
Then - Actions
- Set TEMP_POINT = (Position of (Casting unit))
- Unit - Create 2 TheTraitor[1] for (Owner of (Casting unit)) at TEMP_POINT facing (Random angle) degrees
- Custom script: call RemoveLocation(udg_TEMP_POINT)
- Set TEMP_UNITGROUP = (Units owned by (Owner of (Casting unit)) matching ((Unit-type of (Matching unit)) Equal to (==) TheTraitor[1]))
- Wait 0.10 seconds
-
Unit Group - Pick every unit in TEMP_UNITGROUP and do (Actions)
-
Loop - Actions
- Unit - Add Summoned to (Matching unit)
-
Loop - Actions
- Custom script: call DestroyGroup (udg_TEMP_UNITGROUP)
- Else - Actions
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of |cff00ffffSummon Traitor|r for (Casting unit)) Equal to (==) (Random integer number between 7 and 11)
-
Then - Actions
- Set TEMP_POINT = (Position of (Casting unit))
- Unit - Create 3 TheTraitor[1] for (Owner of (Casting unit)) at TEMP_POINT facing (Random angle) degrees
- Custom script: call RemoveLocation(udg_TEMP_POINT)
- Set TEMP_UNITGROUP = (Units owned by (Owner of (Casting unit)) matching ((Unit-type of (Matching unit)) Equal to (==) TheTraitor[1]))
- Wait 0.10 seconds
-
Unit Group - Pick every unit in TEMP_UNITGROUP and do (Actions)
-
Loop - Actions
- Unit - Add Summoned to (Matching unit)
-
Loop - Actions
- Custom script: call DestroyGroup (udg_TEMP_UNITGROUP)
- Else - Actions
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of |cff00ffffSummon Traitor|r for (Casting unit)) Equal to (==) (Random integer number between 10 and 14)
-
Then - Actions
- Set TEMP_POINT = (Position of (Casting unit))
- Unit - Create 4 TheTraitor[1] for (Owner of (Casting unit)) at TEMP_POINT facing (Random angle) degrees
- Custom script: call RemoveLocation(udg_TEMP_POINT)
- Set TEMP_UNITGROUP = (Units owned by (Owner of (Casting unit)) matching ((Unit-type of (Matching unit)) Equal to (==) TheTraitor[1]))
- Wait 0.10 seconds
-
Unit Group - Pick every unit in TEMP_UNITGROUP and do (Actions)
-
Loop - Actions
- Unit - Add Summoned to (Matching unit)
-
Loop - Actions
- Custom script: call DestroyGroup (udg_TEMP_UNITGROUP)
- Else - Actions
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of |cff00ffffSummon Traitor|r for (Casting unit)) Equal to (==) (Random integer number between 13 and 17)
-
Then - Actions
- Set TEMP_POINT = (Position of (Casting unit))
- Unit - Create 5 TheTraitor[1] for (Owner of (Casting unit)) at TEMP_POINT facing (Random angle) degrees
- Custom script: call RemoveLocation(udg_TEMP_POINT)
- Set TEMP_UNITGROUP = (Units owned by (Owner of (Casting unit)) matching ((Unit-type of (Matching unit)) Equal to (==) TheTraitor[1]))
- Wait 0.10 seconds
-
Unit Group - Pick every unit in TEMP_UNITGROUP and do (Actions)
-
Loop - Actions
- Unit - Add Summoned to (Matching unit)
-
Loop - Actions
- Custom script: call DestroyGroup (udg_TEMP_UNITGROUP)
- Else - Actions
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of |cff00ffffSummon Traitor|r for (Casting unit)) Equal to (==) (Random integer number between 16 and 20)
-
Then - Actions
- Set TEMP_POINT = (Position of (Casting unit))
- Unit - Create 6 TheTraitor[1] for (Owner of (Casting unit)) at TEMP_POINT facing (Random angle) degrees
- Custom script: call RemoveLocation(udg_TEMP_POINT)
- Set TEMP_UNITGROUP = (Units owned by (Owner of (Casting unit)) matching ((Unit-type of (Matching unit)) Equal to (==) TheTraitor[1]))
- Wait 0.10 seconds
-
Unit Group - Pick every unit in TEMP_UNITGROUP and do (Actions)
-
Loop - Actions
- Unit - Add Summoned to (Matching unit)
-
Loop - Actions
- Custom script: call DestroyGroup (udg_TEMP_UNITGROUP)
- Else - Actions
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of |cff00ffffSummon Traitor|r for (Casting unit)) Equal to (==) 20
-
Then - Actions
- Set TEMP_POINT = (Position of (Casting unit))
- Unit - Create 7 TheTraitor[1] for (Owner of (Casting unit)) at TEMP_POINT facing (Random angle) degrees
- Custom script: call RemoveLocation(udg_TEMP_POINT)
- Set TEMP_UNITGROUP = (Units owned by (Owner of (Casting unit)) matching ((Unit-type of (Matching unit)) Equal to (==) TheTraitor[1]))
- Wait 0.10 seconds
-
Unit Group - Pick every unit in TEMP_UNITGROUP and do (Actions)
-
Loop - Actions
- Unit - Add Summoned to (Matching unit)
-
Loop - Actions
- Custom script: call DestroyGroup (udg_TEMP_UNITGROUP)
- Else - Actions
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events