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

Set x = Name of Entering Region

Status
Not open for further replies.
Level 7
Joined
Jan 18, 2007
Messages
180
Is there any way to set the name of a region to a variable? I'm trying to get a trigger like this:
  • Horizontal Street
    • Events
      • Unit - A unit enters a <gen>
      • Unit - A unit enters b <gen>
      • Unit - A unit enters c <gen>
      • Unit - A unit enters d <gen>
      • Unit - A unit enters e <gen>
    • Conditions
    • Actions
      • Set xstring = (Name of (Entering Region))
I need something that preforms like that action.

I know I could just make the worlds longest "If/Then/Else" but there must be another way, because I actually have way more events than the 5 listed above.

Thanks. Hope I was clear enough.
 
Level 28
Joined
Mar 25, 2008
Messages
2,955
Set strings according to the region like string[1] = City of ownage and make the string appear when a unit enters the region
Like:
  • Events
    • Unit - A unit enters Rect 001 <gen>
  • Conditions
  • Actions
    • Set tempforce = Playergroup(Triggering Player)
    • Game - Display message to tempforce for 1337 seconds: string[1]
    • Custom script: call DestroyForce(udg_tempforce)
or even more easy without strings
  • Events
    • Unit - A unit enters Rect 001 <gen>
  • Conditions
  • Actions
    • Set tempforce = Playergroup(Triggering Player)
    • Game - Display message to tempforce for 1337 seconds: CitY 0F owNagE
    • Custom script: call DestroyForce(udg_tempforce)
 
Status
Not open for further replies.
Top