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

[Solved] Region contains region?

Level 18
Joined
Jun 2, 2009
Messages
1,233
Hello. I am trying to detect this one but after many tries i did not make it work.

  • Actions
    • Set TempPoint[0] = (Random point in (Entire map))
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
  • I WANT TO DETECT THIS >>> TempPoint[0] NOT IN (REGION THAT I WANT TO ADD)
    • Then - Actions
      • Trigger - Run (This trigger) (checking conditions)
    • Else - Actions
      • Unit - Create 1 Rifleman for Player 12 (Brown) at TempPoint[0] facing (Position of (Triggering unit))
There is point contains region but it not works. Or i do not know how to use it.
 
Level 18
Joined
Jun 2, 2009
Messages
1,233
This doesn't work?

  • (MyRegion) contains (MyPoint) Equal to False // It's in Boolean
Also I think it's safer to use Playable Map Area because I assume Entire Map contains the terrain in the black borders and we can't do anything there
I do not know how to use it.

Region 000 is half of the map. It says NO always.

  • Melee Initialization
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set TempPoint[0] = (Random point in (Playable map area))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Region centered at TempPoint[0] with size (0.00, 0.00)) contains (Center of Region 000 <gen>)) Equal to True
        • Then - Actions
          • Game - Display to (All players) the text: yes
        • Else - Actions
          • Game - Display to (All players) the text: NO
 
Top