HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Trigger Help

04-23-2007, 11:37 AM#1
famouspker49
hey i am making a map and i am trying to make on team lose when a building or certain hero is killed, but im not sure what i am doing wrong, because i am fairly new to triggers and its all been trial by fire,and i have looked through a few tuts, but cannot find what i was looking for so i was hoping someone could tell me what i did wrong
Attached Images
File type: jpgtrigger.JPG (42.0 KB)
04-23-2007, 12:01 PM#2
TheSecretArts
If you want to invoke defeat on the owner than have the ONLY action be:

Player - Defeat Owner of Triggering Unit (Show Dialog, Show Scores)

or

Player - Defeat Owner of Triggering Unit with the text: <defeat text> (Show Dialog, Show Scores)

By defeat i mean, the thing that says YOU LOSE!

If you want to do something that effects a player, than you have to look under the player section in GUI Triggering.
From the looks of what you did before, you were trying to defeat them melee-style, which only works in melee games.
04-23-2007, 01:22 PM#3
Zwan
yep Secretarts is correct, but it's under the "Game" menu. You need to actually defeat the player.


Trigger:
Game - Defeat (Owner of (Dying Unit)) with the message: Game Over Man!
04-23-2007, 09:00 PM#4
famouspker49
sweet thanks guys
04-23-2007, 09:17 PM#5
Dil999
Also, you said
Pick every unit owned by Bla Bla Bla
then used Triggering Unit in the next line (remove triggering unit)
This won't do what you want. This will pick every unit on the map and remove the first unit that died (the one that died to start all these effects)
What you want is Remove (Picked Unit). Picked unit refers to the unit picked by Pick Every Unit actions. \
Finally, when you want to show us a trigger you can simply click the trigger in trigger editor, then go to the little 'page' on the top (Just above Events) right click, and say Copy As Text. This copies your trigger into text you can paste elsewhere.
04-25-2007, 11:37 AM#6
famouspker49
thanks for the help dill but i got that part figured out already but i have 2 more questions, how can you make allies by typing something and is there a way to change the screen when u lose, because it my maps it shows it like a campaign with "reduce diffuculty" and "restart" even tho they dont work
04-28-2007, 02:04 AM#7
Dil999
Sorry for the slow response (not even sure if you still need an answer)
Im not sure how to change the loss screen, but heres the awnser to your first question:
You can change players' alliances by doing this action:
Trigger:
Player - Make Player 1 (Red) treat Player 2 (Blue) as an Ally with shared vision

If you wanted to do this in a chat event, you do this:
Trigger:
Ally
Collapse Events
Player - Player 1 (Red) types a chat message containing -ally as A substring
Conditions
Collapse Actions
Player - Make (Triggering player) treat (Player((Integer((Substring((Entered chat string), 7, 7)))))) as an Ally with shared vision
Basically, what this does, is check when a player enters a message with -ally in it. If it does, it makes the player who entered the chat message ally the player whos number is the 7th letter of the message. So if i entered -ally 1, I would ally player 1 (because 1 is the 7th letter)