• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Need Trigger Help!!!

Status
Not open for further replies.
Level 18
Joined
Mar 7, 2005
Messages
824
I need a condition, but cant figure it out how i should do it :/
for example:

event: -player1 types in a chat massage: -gold
-player2 types in a chat massage: -gold
(dont know the fully trigger name for this moment)

condition: dont know :S

action: -give triggering player ***** gold
-remove *nameofunit* ownt by triggering player

And now after you typed it in you get the money and after it .. the unit is away from the rect and u cant use the "goldtrigger" any more..but one for the player who typed it in, for the other palyers i must be work. for example player1 type in "-gold" get the gold and after it only player one cant aktivate this trigger but for the other player who got this "unit" in the rect it must work.

this is just an example, my trigger is based on a save and load-herosystem. the aim is to load the hero only ones and not that u can load 10 heroes or more...

Thx in advance!
 
Level 8
Joined
Jul 28, 2004
Messages
258
i think it would be better to use a variable, press ctrl-b and make a variable called HasUsedGold which would be an array of 12 booleans.
Ex:
Code:
event: -player1 types in a chat massage: -gold 
-player2 types in a chat massage: -gold 

condition: HasUsedGold[Player Number of(triggering player) = false

action: -give triggering player ***** gold 
-set HasUsedGold[Player Number of(triggering player) = true
 
Level 18
Joined
Mar 7, 2005
Messages
824
thx for your post, and i think your answer is mainly correct but this was an example with the gold. my trigger is a load/save- system and i have fixed it (u shouldnt load more heroes then 1) with a player group:
event: player types in -load
condition: triggering player is in playergroup = true
action : load hero

second trigger:
event: player types in -load
condition: none
action: remove triggering player from playergroup

this is just a example of my triggers, so the trigger i wrote here arent exactly correct :)
 
Status
Not open for further replies.
Top