• 🏆 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!

Trigger: REALLY Simple

Status
Not open for further replies.
Level 4
Joined
Feb 24, 2015
Messages
50
Hey Hive!,

Okay, so I'm not a triggerer, but it still disappoints me that I cannot work this simple trigger out. I need it for my campaign, yet can't seem to get my head around it (maybe it's the tiredness and stress of everyday life, I'm not sure).

The trigger I need is basic: when the player builds 3 farms and 1 barracks they finish the level.

The trigger I tried to use is as followed:

  • Map initialization
  • ((Number of living Farm units owned by Player 1 (Red)) Equal to 3) and ((Number of living Barracks units owned by Player 1 (Red)) Equal to 1)
  • Game - Victory Player 1 (Red) (Show dialogs, Show scores)
 
Level 14
Joined
Aug 30, 2004
Messages
909
Triggers are annoying at first, but they open up so many possibilities that I recommend you get into them if you can. Here is a hint that might help:

Whenever you don't know what a trigger is doing, put in this action:

  • Game - Display to (All players) for 5.00 seconds the text: Victory Trigger just fired
That way when you are play testing, you'll see this message when the trigger fires. If you did that and play tested your map, you'd see the message at the very start and then never again, so you'd know the trigger wasn't firing. Putting messages in your triggers when you first make them really helps know what happened and in what order


For this particular trigger, you might want to put a "wait" action before you declare victory. As it is now, the moment that unit is done being constructed the game will instantly be over. Here are some ideas to make it a bit more professional:

When the trigger fires, wait two seconds. Then play the "Quest completed" sound. To play the sound you will first need to import it from the sound editor. So click on the sound icon to open the sound editor. On the left are all the sounds in the game. Click on anything and hit CONTROL-F to search. Find the "quest completed" sound. Right-click that sound and find the "use this sound" or something like that. It should appear on the right.

Then, go back to your trigger and put the "Sound - Play Sound" action. Do not use the 3D sound action; that only works with 3d sounds.

Then wait 2 more seconds and put the victory statement.
 
Status
Not open for further replies.
Top