• 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 help with some Risk triggers

Status
Not open for further replies.
Level 7
Joined
Aug 14, 2006
Messages
122
Okay, I've tried searching for a while on the forum but I cannot find anything (if there is something that explains this, I'm sorry for making a redundant thread).

I started making a risk style map, but I quite quickly encountered a few problems:



First, I have no idea how to make that all players receive random provinces at start. Can anyone please tell me how I can do this?

Only ways I can think of right now, that wont make players get places that other players already got, is to instead make that players receive a random set of provinces instead (ie, one player receive those provinces and so on) but is there another way to do this? (which will make it truly random?)


Also, I got some problems with the taking provinces trigger:

Western Waste 1 Get
Events
Unit - A unit enters Western Chaos Waste 1 <gen>
Conditions
(Number of units in (Units in Western Chaos Waste 1 <gen> owned by (Owner of Marauder Camp [Western Wastes] 0001 <gen>))) Equal to 0
(Owner of (Triggering unit)) Not equal to (Owner of Marauder Camp [Western Wastes] 0001 <gen>)
Actions
Unit - Change ownership of Marauder Camp [Western Wastes] 0001 <gen> to (Owner of (Entering unit)) and Change color
Unit - Change ownership of Chaos Waste Tower 0002 <gen> to (Owner of (Entering unit)) and Change color


Sometimes it work immediately.
But sometimes it doesn't work at all. If I wait for a while and tries again, it works. Can anyone please see why that would happen? Or should I just try find someway else for areas to be taken?
 
Level 24
Joined
May 9, 2007
Messages
3,563
Hint Use trigger tags. They are at the Advanced Controls, on the left side of the controls.

To set random provinces at start.
Also to capture.

I'll give you some triggers in one second.

One question. Do you want the players to have equal amounts of provinces? Or totally random.

Here is the province trigger - Completely random.

  • Provinces
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Picked unit)) Equal to Province
            • Then - Actions
              • Unit Group - Add (Picked unit) to YourUnitGroup
            • Else - Actions
      • For each (Integer A) from 1 to (Number of units in YourUnitGroup), do (Actions)
        • Loop - Actions
          • Unit - Change ownership of (Random unit from YourUnitGroup) to (Player((Random integer number between 1 and 12))) and Change color
          • Unit Group - Remove (Picked unit) from YourUnitGroup
I would recommend, for the capture that you do it on the death of a unit instead of entering a region. Give me more details and I can do that too.
 
Status
Not open for further replies.
Top