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

Merging Regions (remove region from another region)

Status
Not open for further replies.
Level 20
Joined
Jul 14, 2011
Messages
3,213
Hi!

I made this region.

attachment.php


I want creeps to appear in the Blue Zone, and not in the Red Zone. How can i do this?
 

Attachments

  • Merged Regions.jpg
    Merged Regions.jpg
    354.1 KB · Views: 142
Level 20
Joined
Jul 14, 2011
Messages
3,213
I'm thinking something similar and I think it's a good idea.

Making Two small regions at the entrance and exit of the region. One to activate "WoodCombat Trigger" and another to Disable "WoodCombat Trigger".

When the unit enters "WoodCombat Activate" that trigger turns on, creating creeps around the hero, without having to create the whole region. And when the unit enters "WoodCombat Deactivate" creeps just stop spawning... I'll try and report :p

EDIT: What happens if I create multiple Events "Unit Enters Region" in the same trigger?
 
Level 17
Joined
Feb 11, 2011
Messages
1,860
It will trigger if any of the events happen. You could do something like this:

  • Untitled Trigger 001
    • Events
      • [your events]
    • Conditions
    • Actions
      • Set p = (Random point in Region 000 <gen>)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Region 001 <gen> contains p) Equal to False
          • (Region 002 <gen> contains p) Equal to False
        • Then - Actions
          • Unit - Create 1 [your_creep] for Neutral Hostile at p facing Default building facing degrees
        • Else - Actions
          • Trigger - Run (This trigger) (checking conditions)
      • Custom script: call RemoveLocation(udg_p)
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
I removed all the region, and placed two regions on each entrance/exit, one to add the unit to "Wood_Group" and another to remove it.... The thing is that, since units spawn at 800 AoE of the hero position, creeps can spawn outside the woods, down the mountains, or over the mountains (in the top-left corner of the img), etc...

I'm thinking about a really poor quality solution: Create a region that covers good part of the woods, from the center, and spawn units in a random point of that region and order these to attack the Hero, wherever he is... At least works for this wood...


attachment.php


Red Region is a "Safe Zone" I'd just use "Unit enters Region - Unit belongs to Neutral Hostile - Unit - Remove unit"
 

Attachments

  • Wood2.jpg
    Wood2.jpg
    321.2 KB · Views: 120
Level 17
Joined
Feb 11, 2011
Messages
1,860
About the 800 AoE thing, you could do this:

  • Trigger
    • Events
      • [your events]
    • Conditions
    • Actions
      • Set p = (Random point in Region 000 <gen>)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Region 001 <gen> contains p) Equal to False
          • (Region 002 <gen> contains p) Equal to False
        • Then - Actions
          • Unit - Create 1 [your_creep] for Neutral Hostile at p facing Default building facing degrees
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Region 000 <gen> contains (Last created unit)) Equal to False
            • Then - Actions
              • Unit - Remove (Last created unit) from the game
              • Trigger - Run (This trigger) (checking conditions)
            • Else - Actions
          • Else - Actions
      • Custom script: call RemoveLocation(udg_p)
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
I like the idea, but... it's too much work, don't you think?... xD I think it's a lot simpler, and almost equally efficient to spawn in that region inside the wood. I'll may try that system you're suggesting in another region...
 
Status
Not open for further replies.
Top