ok, say a civlian dies, how do you make a trigger so that all units owned by the played whose civilian dies, dies?
easy steps please.. not some complex jibba jabba :D
so far ive done : EVENT: unit (civilian (male)) dies
ACTION???
so, how do i make it that, if 7 heroes die (civilians) that Undead wins? and if Undead dies (havent created hero just yet - gonna make it a choice between zealot and infested marine-not sure how to do choice thentriggers any help there would be nice as well) Survivor wins (the 7 civilians)
I'd start with a global variable (Integer) called something like CiviliansKilled (with a default value of 0). Then something like this:
Quote:
Trigger: CheckForCivilianDefeat
Events:
none
Conditions:
CiviliansKilled >= 7
Actions:
End game in Defeat for Player X
End game in Victory for Player Y
Then a trigger like this to count the dead civies and check the defeat conditions given in the first trigger:
Quote:
Events:
Any unit dies
Conditions:
Unit Type of Triggering Unit == Civilian
Actions:
Set variable CiviliansKilled = Arithmetic (Integer) "CiviliansKilled + 1"
Run Trigger CheckForCivilianDefeat, Check conditions and Don't Wait
From what I read I'm guessing you'll be spawning the undead hero with triggers after the game starts, in which case you'll need a Unit variable (I'll call it UndeadHeroUnit in my example) - when you spawn him, add a "Set variable - Set UndeadHeroUnit to Last Created Unit" right after the action to create the unit.
Quote:
Events:
UndeadHeroUnit dies
Actions:
End game in Defeat for Player Y
End game in Victory for Player X
As for the undead hero selection dialog, I'll refer you to Voxglhf's tutorial to make use of existing resources and save myself a lot of typing. ;)
Yes, ..yes YES!!
all of those things apply to me!! Even that otherguys post applys to me... i just suck at using conditions i discovered.... i cant even get past the first condition.. i changed it to >= instead of == but thats about all i can do :(... actions and events are easy as peasy.. conditions are a bit different for me.. lol
You need to create the variables before you can use them in a trigger (click in the left-hand column of the trigger editor and hit the 'X=' button on the far right - or press Ctrl B). Variables default to Integers, so for the UndeadHeroSelection variable, use the dropdown menu to change the type to Unit.
Once you get to the trigger, create a condition, double click the "Value 1: Owner of Unit", click on the Variables tab and select your CiviliansKilled variable. Then set the >= 7 part.
For the kill counter trigger (second one), change the condition's "Value 1:" to Unit Type of Unit. 'Unit' = Triggering Unit. "Value 2:" = Civilian (Male).
For the UndeadHero death, use a Unit Dies event. Double click on the Any part, go to the variables tab and select your UndeadHeroUnit variable from the list - no conditions needed.
so for the 2nd one the action would be?: Event: Unit-Any Unit dies
Condition: (unit type of(triggering unit)) ==Civilian (Male)
ACTIONS VAriable- setcivlianskilled =(civilianskilled + 1)
Trigger - RUn check civlian defeat (check conditions, Don't wait until it finishes)
ok, say a civlian dies, how do you make a trigger so that all units owned by the played whose civilian dies, dies? easy steps please.. not some complex jibba jabba :D so far ive done : EVENT: unit (civilian (male)) dies ACTION???
@CrazyTwigman: Go
Event:
Actions:
so for last action: Unit -kill (triggering unit) ?? there was no kill picked unit
Click on the "Triggering Unit" part, and scroll up a bit. Picked Unit is in the list.
Did you look in the unit group tab?
thanks.. let me test now hang on :D can you help in my other post with the money?
yay it works thanks!
so, how do i make it that, if 7 heroes die (civilians) that Undead wins? and if Undead dies (havent created hero just yet - gonna make it a choice between zealot and infested marine-not sure how to do choice thentriggers any help there would be nice as well) Survivor wins (the 7 civilians)
@CrazyTwigman: Go
I'd start with a global variable (Integer) called something like CiviliansKilled (with a default value of 0). Then something like this:
Then a trigger like this to count the dead civies and check the defeat conditions given in the first trigger:
From what I read I'm guessing you'll be spawning the undead hero with triggers after the game starts, in which case you'll need a Unit variable (I'll call it UndeadHeroUnit in my example) - when you spawn him, add a "Set variable - Set UndeadHeroUnit to Last Created Unit" right after the action to create the unit.
As for the undead hero selection dialog, I'll refer you to Voxglhf's tutorial to make use of existing resources and save myself a lot of typing. ;)
http://forums.sc2mapster.com/resources/tutorials/1216-trigger-make-a-dialog-for-race-class-selection
Yes, ..yes YES!! all of those things apply to me!! Even that otherguys post applys to me... i just suck at using conditions i discovered.... i cant even get past the first condition.. i changed it to >= instead of == but thats about all i can do :(... actions and events are easy as peasy.. conditions are a bit different for me.. lol
@CrazyTwigman: Go
You need to create the variables before you can use them in a trigger (click in the left-hand column of the trigger editor and hit the 'X=' button on the far right - or press Ctrl B). Variables default to Integers, so for the UndeadHeroSelection variable, use the dropdown menu to change the type to Unit.
Once you get to the trigger, create a condition, double click the "Value 1: Owner of Unit", click on the Variables tab and select your CiviliansKilled variable. Then set the >= 7 part.
For the kill counter trigger (second one), change the condition's "Value 1:" to Unit Type of Unit. 'Unit' = Triggering Unit. "Value 2:" = Civilian (Male).
For the UndeadHero death, use a Unit Dies event. Double click on the Any part, go to the variables tab and select your UndeadHeroUnit variable from the list - no conditions needed.
yea i am yet to create a undead hero :P so no connditions at all.. ok ill give it a shot :D... well not none butr less than i expected thanks man :D
so for the 2nd one the action would be?: Event: Unit-Any Unit dies Condition: (unit type of(triggering unit)) ==Civilian (Male) ACTIONS VAriable- setcivlianskilled =(civilianskilled + 1) Trigger - RUn check civlian defeat (check conditions, Don't wait until it finishes)
@CrazyTwigman: Go
Yup. :)