- Joined
- Dec 5, 2009
- Messages
- 846
Hey, i think my index variable is the fault here, because when player 1 uses the ability, index will be set to 1, but if player 2 uses the same right after player 1 then the index will be set to 2 and it all will be fail, so is there any other way to do this so it will work for more players?
Thank you!
Thank you!
-
Storing Elements
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
(Ability being cast) Equal to Fire
-
-
-
-
Actions
-
Set U = (Triggering unit)
-
Set Index = (Player number of (Owner of U))
-
Set Unit[Index] = (Triggering unit)
-
Set one[Index] = 1
-
Set two[Index] = 2
-
Set three[Index] = 3
-
Set four[Index] = 4
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
StoringElements[Index] Equal to 4
-
-
Then - Actions
-
Game - Display to (All players matching ((Matching player) Equal to (Owner of Unit[Index]))) the text: You already have 4 ...
-
-
Else - Actions
-
Set StoringElements[Index] = (StoringElements[Index] + 1)
-
-
-
-