Hello!
Im trying to create an Item that when you use it spawns 1 out of 5 Units choosen randomly.
But when i use the Item nothing happens.
I created a Real Variable named ItemUnitCreator
I dont know what the problem is. Im a noob in triggering so i hope you can help me.
Thank you for reading my thread!
Im trying to create an Item that when you use it spawns 1 out of 5 Units choosen randomly.
But when i use the Item nothing happens.
I created a Real Variable named ItemUnitCreator
I dont know what the problem is. Im a noob in triggering so i hope you can help me.
Thank you for reading my thread!
-
Random Unit Creator
-
Events
- Unit - A unit Uses an item
-
Conditions
- (Item-type of (Item being manipulated)) Equal to Unit Creator
-
Actions
- Set ItemUnitCreator = (Random real number between 1.00 and 5.00)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ItemUnitCreator Equal to 1.00
-
Then - Actions
-
Unit - Create 1 Footman for (Owner of (Hero manipulating item)) at (Center of (Playable map area)) facing Default building facing degrees
- Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ItemUnitCreator Equal to 2.00
-
Then - Actions
- Unit - Create 1 Knight for (Owner of (Hero manipulating item)) at (Center of (Playable map area)) facing Default building facing degrees
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ItemUnitCreator Equal to 3.00
-
Then - Actions
- Unit - Create 1 Priest for (Owner of (Hero manipulating item)) at (Center of (Playable map area)) facing Default building facing degrees
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ItemUnitCreator Equal to 4.00
-
Then - Actions
- Unit - Create 1 Rifleman for (Owner of (Hero manipulating item)) at (Center of (Playable map area)) facing Default building facing degrees
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ItemUnitCreator Equal to 5.00
-
Then - Actions
- Unit - Create 1 Spell Breaker for (Owner of (Hero manipulating item)) at (Center of (Playable map area)) facing Default building facing degrees
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Unit - Create 1 Footman for (Owner of (Hero manipulating item)) at (Center of (Playable map area)) facing Default building facing degrees
-
If - Conditions
-
Events