This problem occured when I was trying to make Anachron's Inventory System to work. The problem is that: for example, after certain actions of Player 1, the trigger is used to Player 2 instead of Player 1, and as well, when Player 2 makes an action, trigger action is used to Player 3 and so on. The trigger itself:
-
Events:
-
Unit - A unit starts the effect of an ability
-

Conditions:
-
-
(Unit-type of (Triggering unit)) equal to X
-

Or - Any (Conditions) are true:
-


(Ability being cast) equal to Y
-


(Ability being cast) equal to Z
-


(Ability being cast) equal to C
-
-

Actions:
-
-
Custom script: local unit fakeInv = null
-
Custom script: local unit hero = null
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-

If - Conditions
-


(Ability being cast) equal to Y
-
-

Then - Actions
-


Custom script: set fakeInv = CreateInventoryUnit(Player(GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))), 'h000')
-


Custom script: set hero = CreateUnit(Player(GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))), 'H00B', 0., 0., 0.)
-


Custom script: call CreateInventoryUI(hero, fakeInv)
-
-





