I need help with this trigger. Whenever a unit picks up an item it increases their integer called vacuole_integer. Then this is displayed on their multiboard. I am basically creating a custom currency called vacuole( I am making a cell type game). Then they can research an ability if they have enough vacuoles they can research or evolve into a better unit. The problem is how do i stop a unit from researching if they don't have at least that integer amount? Here is my trigger so far. As for the displaying on the multiboard that is working.
-
Events
-
Unit - A unit owned by Player 1 (Red) Begins research
-
-
Conditions
-
(Researched tech-type) Equal to Upgrade (Night Elf)
-
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Vacuoleinterger[1] Less than 4
-
-
Then - Actions
-
//Here is where I want it to stop the upgrading
-
-
Else - Actions
-
Set Vacuoleinterger[1] = (Vacuoleinterger[1] - 4)
-
For each (Integer A) from 0 to Vacuoleinterger[1], do (Actions)
-
Loop - Actions
-
Multiboard - Set the text for (Last created multiboard) item in column 2, row 2 to (String((Integer A)))
-
-
-
-
-