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

How To Make A Trigger Work Once

How To Make A Trigger Work Once

By Indomitable1319

First, you create a boundary space with only a bit of free space. Then, make a custom Wisp (Or any other unit that doesn't attack) for an enemy. Put one of those units there in the boundary space, and then open up the Trigger Editor.
1. The Setup - Create a trigger named (your own name)1a
  • Trigger One
    • Events
      • Unit - A unit (Whatever you want to happen to trigger it; preferably)Enters Region000
    • Conditions
    • Actions
      • Unit - Kill Wisp0001
Okay! Now you have the basic layout. Next you need to make the real trigger.
2. The Trigger - Create another trigger named (your own name)1b
  • Trigger Two
    • Events
      • Unit - Wisp0001 dies
    • Conditions
    • Actions
      • Your action
Now that will make sure it happens only once.
Example
Here's an example for you. I want Arthas to say "I like cheese" only once when he enters a specific region.
So here:
  • Arthas Comments1a
    • Events
      • Unit - Arthas0001<gen> enters Region000
    • Conditions
    • Actions
      • Kill Wisp0002<gen>
  • Arthas Comments1b
    • Events
      • Unit - Wisp0002<gen> dies
    • Conditions
    • Actions
      • Game - Display to all players the text: |cffffcc00Arthas|r: I like cheese!
And it will only work once. Thanks for reading! I hope this tutorial was very useful! Give credit to me if you will use this in a game! I hope your game will be a very good one!



By Indomitable1319
 
Last edited:
Level 31
Joined
May 3, 2008
Messages
3,154
If I want to do that, I could just easily set it like this

Event - Unit enter region xxx

Condition

Event

If condition Triggering unit type equal to Arthas and integer xx equal to 0

Then display text Arthas: bla bla bla
set integer xx equal to 1

Else

or I could set it to

Event - Unit enter region xxx

Condition - If condition Triggering unit type equal to Arthas

Event - Then display text Arthas: bla bla bla
-Turn off this trigger

By the way, your tutorial does not follow the proper formatting and it was way too simple and... hmm.. inefficient.
 
Top