So i have this trigger and ever 10 seconds he pick all player and see if that player has enough food to supply for him/her unit but the integer (Temp_Integer) never change between when the trigger is fired up.
Here my trigger:
Thank you for any help you can give
+rep to people who give an good answer:shades:
Here my trigger:
Trigger:
- FoodUse
- Events
- Time - Every 10.00 seconds of game time
- Conditions
- Actions
- Player Group - Pick every player in (All players matching (((Matching player) controller) Equal to User)) and do (Actions)
- Loop - Actions
- Set Temp_Integer = 0
- Set Temp_Group = (Units owned by (Picked player) matching (((Matching unit) is A structure) Equal to False))
- Set Temp_Integer = (Number of units in Temp_Group)
- Custom script: call DestroyGroup (udg_Temp_Group)
- Set Temp_Integer = (Temp_Integer x 3)
- Game - Display to (Player group((Picked player))) the text: (String(Temp_Integer))
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Temp_Integer Less than or equal to Food[(Player number of (Picked player))]
- Then - Actions
- Set Food[(Player number of (Picked player))] = (Food[(Player number of (Picked player))] - Temp_Integer)
- Multiboard - Set the text for (Last created multiboard) item in column 4, row (Integer(Multiboard_Spots[(Player number of (Picked player))])) to (String(Food[(Player number of (Picked player))]))
- Else - Actions
- Game - Display to (Player group((Picked player))) the text: |CFFFF0303Warning|R...
- Set Food[(Player number of (Picked player))] = 0
- Multiboard - Set the text for (Last created multiboard) item in column 4, row (Integer(Multiboard_Spots[(Player number of (Picked player))])) to (String(Food[(Player number of (Picked player))]))
- Set Temp_Group = (Units in (Playable map area) owned by (Picked player))
- Unit Group - Pick every unit in Temp_Group and do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- ((Picked unit) is A structure) Not equal to True
- Then - Actions
- Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - (Random real number between 32.00 and 61.00))
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- Custom script: call DestroyGroup (udg_Temp_Group)
- If - Conditions
- Set Temp_Integer = 0
- Loop - Actions
- Player Group - Pick every player in (All players matching (((Matching player) controller) Equal to User)) and do (Actions)
- Events
Thank you for any help you can give
+rep to people who give an good answer:shades: