- Joined
- Feb 28, 2013
- Messages
- 1,898
Can someone help me convert this to a trigger. The editor doesn't seem to recognize counting mana of unit-types, instead it asks for a specific unit.
So i have a plant with a mana of 100, which decreases -2 every second. (I've already finished this, i made make regeneration increment to negative to make this happen).
Now when the mana reaches 0 the plant should generate an item, tome of experience for example, then the mana should go back to 100 and the loop goes on. The player can build alot of plants, so i shouldnt specify it to a single plant.
So i have a plant with a mana of 100, which decreases -2 every second. (I've already finished this, i made make regeneration increment to negative to make this happen).
Now when the mana reaches 0 the plant should generate an item, tome of experience for example, then the mana should go back to 100 and the loop goes on. The player can build alot of plants, so i shouldnt specify it to a single plant.
-
Detect Plant Death
-
Events
-
Unit - (This should be a plant) mana becomes Less than 1.00
-
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Random integer number between 1 and 10) Equal to 1
-
-
Then - Actions
-
Game - Display to Player Group - Player 1 (Red) the text: Your plant is ready...
-
Item - Create Tome of Experience at (Position of ((This should be a plant)))
-
-
Else - Actions
-
Game - Display to Player Group - Player 1 (Red) the text: Your plant died.
-
-
-
-
-
Detect Plant Death
-
Events
-
Unit - A unit enters (Entire map)
-
-
Conditions
-
And - All (Conditions) are true
-
Conditions
-
(Unit-type of (Entering unit)) Equal to Plant
-
(Integer((Mana of (Entering unit)))) Less than or equal to 1
-
-
-
-
Actions
-
Item - Create Tome of Experience at (Position of (Entering unit))
-
Game - Display to Player Group - Player 1 (Red) the text: Your plant is ready...
-
-
Last edited: