- Joined
- Sep 19, 2006
- Messages
- 152
Do commands such as "Player Number of Triggering Player" create more "computer drain" in very long triggers? If so, is it better than to set a variable at the start of the trigger (something such as Set X = Player Number of Triggering Player), as in the following example:
Untitled Trigger 001
Events
Conditions
Actions
Player - Set (Triggering player) Current gold to 750
Set Hero[(Player number of (Triggering player))] = (Last created unit)
Set Unit[(Player number of (Triggering player))] = (Sold unit)
Set Target[(Player number of (Triggering player))] = (Target unit of ability being cast)
or
Untitled Trigger 001
Events
Conditions
Actions
Set PlayerNumber = (Player number of (Triggering player))
Player - Set (Player(PlayerNumber)) Current gold to 750
Set Hero[PlayerNumber] = (Last created unit)
Set Unit[PlayerNumber] = (Sold unit)
Set Target[PlayerNumber] = (Target unit of ability being cast)
Untitled Trigger 001
Events
Conditions
Actions
Player - Set (Triggering player) Current gold to 750
Set Hero[(Player number of (Triggering player))] = (Last created unit)
Set Unit[(Player number of (Triggering player))] = (Sold unit)
Set Target[(Player number of (Triggering player))] = (Target unit of ability being cast)
or
Untitled Trigger 001
Events
Conditions
Actions
Set PlayerNumber = (Player number of (Triggering player))
Player - Set (Player(PlayerNumber)) Current gold to 750
Set Hero[PlayerNumber] = (Last created unit)
Set Unit[PlayerNumber] = (Sold unit)
Set Target[PlayerNumber] = (Target unit of ability being cast)