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

Paste Text make trigger?

Status
Not open for further replies.
Level 8
Joined
Dec 9, 2009
Messages
397
I can copy a trigger as text and paste it, but is there a way to paste text to the editor and it makes a trigger? (GUI)

A lot of stuff in my map is named the exact same thing, except the number is diff

for example, i have DungEnt1, DungEnt2, DungEnt3 as zones, so the only thing that needs to be changed in a lot of triggers is a number

If i could paste that into notepad, replace a 2's with 3's and paste it back it would really speed things up for me.
 
Level 8
Joined
Dec 9, 2009
Messages
397
  • Entering1
    • Events
      • Unit - A unit enters DungEnt1 <gen>
    • Conditions
      • ((Owner of (Entering unit)) controller) Equal to (==) User
    • Actions
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DungLock[1] Equal to (==) 1
          • ((Owner of (Entering unit)) is in LootGroup[1]) Equal to (==) False
        • Then - Actions
          • Game - Display to (Owner of (Triggering unit)), at offset (0.00, 0.00) the text: No new players may ...
        • Else - Actions
          • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Number of players in DungeonGroup[1]) Less than (<) 5
            • Then - Actions
              • Player Group - Add (Owner of (Entering unit)) to DungeonGroup[1]
              • Unit - Move (Entering unit) instantly to (Center of DungIn1 <gen>)
              • Camera - Pan camera for (Owner of (Entering unit)) to (Center of DungIn1 <gen>) over 0.00 seconds
            • Else - Actions
              • Game - Display to (Owner of (Entering unit)), at offset (0.00, 0.00) the text: This Dungeon is cur...
So this is for dungeon 1, if all the 1's turned to 2's it would work for dung 2 as all the location names are the same and variables are arrays
 
Level 4
Joined
Apr 15, 2011
Messages
108
you can add
"set action = action + 1" to top of your actions, or just "set action = 2" which is dungeon triggers number, and use "action" as number in your arrays. one variable wont cause you to use so much memory or anything anyway.
 
Level 8
Joined
Dec 9, 2009
Messages
397
So, your saying I'd only have to switch 1 variable for each trigger, interesting.

But it doesn't help with location names.
 
Level 4
Joined
Apr 15, 2011
Messages
108
if you meant "regions" by "locations", then you can put that regions manually to one region variable(with arrays, of course) then do the same way I said above.
 
Status
Not open for further replies.
Top