Ok i have a system in my map so that a integer keeps track of how much exp a hero has earned and a player can type -exp to check how much that is. Anyway i made the trigger so it wouldnt leak by adding the triggering player to a player group then displaying the message to the group but when i type -exp in game it wont display the message this is the trigger:
and yet it will display the message when i make the trigger like this:
What am i doing wrong?
Code:
ExpCheck
Events
Player - Player 1 (Red) types a chat message containing -exp as An exact match
Conditions
Actions
Player Group - Add (Triggering player) to TempPlayerGroup
Set TempUnitGroup = (Units owned by (Triggering player))
Unit Group - Pick every unit in TempUnitGroup and do (Actions)
Loop - Actions
Game - Display to TempPlayerGroup the text: ((PlayerColour[(Player number of (Triggering player))] + (Name of (Picked unit))) + ('s|r total experience gained is + (String(TotalExpGained[(Player number of (Triggering player))]))))
Custom script: call DestroyGroup(udg_TempUnitGroup)
Player Group - Remove all players from TempPlayerGroup
and yet it will display the message when i make the trigger like this:
Code:
ExpCheck
Events
Player - Player 1 (Red) types a chat message containing -exp as An exact match
Conditions
Actions
Set TempUnitGroup = (Units owned by (Triggering player))
Unit Group - Pick every unit in TempUnitGroup and do (Actions)
Loop - Actions
Game - Display to (Player group((Triggering player))) the text: ((PlayerColour[(Player number of (Triggering player))] + (Name of (Picked unit))) + ('s|r total experience gained is + (String(TotalExpGained[(Player number of (Triggering player))]))))
Custom script: call DestroyGroup(udg_TempUnitGroup)
What am i doing wrong?