• 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.

[Trigger] Help in trigger +rep

Status
Not open for further replies.
If they are in jail they are in specific region ?
So pick units in this region, count them and multiply 10 * by the result.

don't do that this is very taxing.

When you place them in jail increase an integer. When you take them out of jail decrease an integer.

Have a periodic trigger that multiplies that integer by 10 and give whatever to whoever you want. That's all there is to it.
 
Level 9
Joined
Jul 11, 2009
Messages
294
don't do that this is very taxing.

When you place them in jail increase an integer. When you take them out of jail decrease an integer.

Have a periodic trigger that multiplies that integer by 10 and give whatever to whoever you want. That's all there is to it.

Hey, I'm sorry but I completely lost touch having being away from editing of maps for about 2-3 years.

Would be great if you could do that for me so I can copy it down.

Thanks a lot. :thumbs_up:
 
I'm not sure how you put them in jail...
It is very simple though. In the trigger that you use to put the units in jail put this right after you put the unit in jail.
  • Set jailCounter = jailCounter + 1
In the trigger you use to take the units out of jail do this right after you take the unit out.
  • Set jailCounter = jailCounter - 1
In a periodic trigger to give the players money do this.
  • Set tempInt = jailCounter x 10
Then do add tempInt to current players gold.
 
Level 9
Joined
Jul 11, 2009
Messages
294
I'm not sure how you put them in jail...
It is very simple though. In the trigger that you use to put the units in jail put this right after you put the unit in jail.
  • Set jailCounter = jailCounter + 1
In the trigger you use to take the units out of jail do this right after you take the unit out.
  • Set jailCounter = jailCounter - 1
In a periodic trigger to give the players money do this.
  • Set tempInt = jailCounter x 10
Then do add tempInt to current players gold.

Ahh great! It's working now, thanks a lot dude! +rep :thumbs_up:




[SOLVED]
 
Status
Not open for further replies.
Top