• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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