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

Triggering Question

Status
Not open for further replies.
Level 5
Joined
Jul 15, 2004
Messages
148
How would I make it so:

Every 60 seconds all settlements (a unit bulding) are selected for a particular player, and all units owned by player 10 in a range of 1000 around the settlements grant the owner of the settlement 1 gold for each unit of player 10 around the settlement.

So... For example:

There are 5 units owned by player 10 within 1000 range of a settlement owned by player 1. Player 1 gets 5 gold (one for each unit owned by player 10). I hope that was made clear.

Thanks!!
 
Level 5
Joined
Jul 15, 2004
Messages
148
The settlements are unbuildable, they are all pre-set in the game. I could create a trigger for each one, but that would be a lot of work and I don't think that is nessesary. I have tried somthing very similar to what you have said- but I will give it a shot.
 
Level 5
Joined
Jul 15, 2004
Messages
148
Suprisingly- I was able to pull it off without any variables what so ever. I used what you gave me as a code for the events- and altered it slightly. Here is what it looks like, incase you are wondering:

(add(number of units in (units in (reigon centered at (position of (random 30 units owned by Player 1 of type Settlement) with size 8000.00, 8000.00 owned by player 10))) to player 1 current gold)

Perhaps one of the largest triggers I have ever used... but this gives me the option of generating settlements at random in the start of the game as opposed to preseting them. A player needs to capture 30 settlements to win a game, so I do not need to add any more than "random 30 units owned by player 1". Thanks for the help Eusira!
 
Status
Not open for further replies.
Top