HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Simple trigger help please.

09-27-2004, 03:49 PM#1
Tazzy
Hello, Its a very simple trigger i cant seem to work out.

This is what i need:

I have 3 forces each with 3 players and a computer. Once the Person has chose his/her hero. When that hero dies. I want him/her to respawn at there base. Like in Dota maps.

Thanx for any help
09-27-2004, 04:07 PM#2
MiGiLiCuDDiE
This should get you going in the right direction.

EVENT:
Unit dies.

CONDITION:
Dying unit was a hero.

ACTION:
If/Than/Multiple actions:
CONDITION:
If dying unt was ally of team1
ACTION
Instantly revive dying hero at team1 base
ELSE:
If/Than/Multiple actions:
CONDITION:
If dying unt was ally of team2
ACTION
Instantly revive dying hero at team2 base
ELSE:
If/Than/Multiple actions:
CONDITION:
If dying unt was ally of team3
ACTION
Instantly revive dying hero at team3 base
ELSE:
Do nothing.
09-27-2004, 05:34 PM#3
Tazzy
Hehe Thanx, But i still dont understand.
Maybe insted of Typnig: Dying unit was a hero., Put the real trigger name like:

Event:
Unit - Generic unit event
A unit dies

Get what i mean, Sorry it may take more time to write and i would be ever so thankfull if you do, But i dont fully understand the way you put it in, I cant find the triggers names for them thnigs.

once again, Th
09-27-2004, 06:23 PM#4
MiGiLiCuDDiE
Sorry for not giving specifics. If I have time tonight I will make the trigger at home and post it here.
09-27-2004, 06:36 PM#5
Dead-Inside
As requested;
Code:
       Events
        Unit - A unit owned by Player 1 (Red) Dies
        Unit - A unit owned by Player 12 (Brown) Dies
    Conditions
        ((Dying unit) is A Hero) Equal to True
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                PlayerTeam[(Player number of (Triggering player))] Equal to 1
            Then - Actions
                Hero - Instantly revive (Dying unit) at (Center of Team1), Hide revival graphics
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                PlayerTeam[(Player number of (Triggering player))] Equal to 2
            Then - Actions
                Hero - Instantly revive (Dying unit) at (Center of Team2), Hide revival graphics
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                PlayerTeam[(Player number of (Triggering player))] Equal to 3
            Then - Actions
                Hero - Instantly revive (Dying unit) at (Center of Team3), Hide revival graphics
            Else - Actions
                Do nothing

This requires you to make another trigger, though, to set players to teams. I assumed the playing players were player 1 to 3, 5 to 7 and 9 to 12, and that the comps were player 4, 8 and 12. If I was incorrect (Comp are 1, 2, 3, or something like that) just change it around. I'm using an integer variable to set them to teams, and they're each given a number, 1 for 1 to 3, 2 for 5 to 7, etc.

Code:
Untitled Trigger 002
    Events
        Map initialization
    Conditions
    Actions
        For each (Integer A) from 1 to 3, do (Set PlayerTeam[(Integer A)] = 1)
        For each (Integer A) from 5 to 7, do (Set PlayerTeam[(Integer A)] = 2)
        For each (Integer A) from 9 to 11, do (Set PlayerTeam[(Integer A)] = 3)

Regards
Dead-Inside
09-27-2004, 08:48 PM#6
Gandalf2349
Dying unit is a hero is under boolean condition. Let us know if you need help finding anything else.