Good trigger?

For fulfilled maps that most likely don't work on the latest patch (1.24 or later).

Moderator: Cheaters

Black-Hole
Forum Fanatic
Posts: 315
Joined: October 16th, 2007, 7:32 pm

Good trigger?

Post by Black-Hole »

Is this a good trigger? i need to know if there is anything wrong

Code: Select all

Killer Select
    Events
    Conditions
    Actions
        Set random = (Random integer number between 1 and 8 )
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                random Equal to 1
            Then - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Player 1 (Red) controller) Equal to User
                    Then - Actions
                        Unit - Create 1 Killer for Player 1 (Red) at (Center of Rect 027 <gen>) facing Default building facing (270.0) degrees
                    Else - Actions
                        Trigger - Run Killer Select <gen> (ignoring conditions)
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                random Equal to 2
            Then - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Player 2 (Blue) controller) Equal to User
                    Then - Actions
                        Unit - Create 1 Killer for Player 2 (Blue) at (Center of Rect 027 <gen>) facing Default building facing (270.0) degrees
                    Else - Actions
                        Trigger - Run Killer Select <gen> (ignoring conditions)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                random Equal to 3
            Then - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Player 3 (Teal) controller) Equal to User
                    Then - Actions
                        Unit - Create 1 Killer for Player 3 (Teal) at (Center of Rect 027 <gen>) facing Default building facing (270.0) degrees
                    Else - Actions
                        Trigger - Run Killer Select <gen> (ignoring conditions)
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                random Equal to 4
            Then - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Player 4 (Purple) controller) Equal to User
                    Then - Actions
                        Unit - Create 1 Killer for Player 4 (Purple) at (Center of Rect 027 <gen>) facing Default building facing (270.0) degrees
                    Else - Actions
                        Trigger - Run Killer Select <gen> (ignoring conditions)
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                random Equal to 5
            Then - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Player 5 (Yellow) controller) Equal to User
                    Then - Actions
                        Unit - Create 1 Killer for Player 5 (Yellow) at (Center of Rect 027 <gen>) facing Default building facing (270.0) degrees
                    Else - Actions
                        Trigger - Run Killer Select <gen> (ignoring conditions)
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                random Equal to 6
            Then - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Player 6 (Orange) controller) Equal to User
                    Then - Actions
                        Unit - Create 1 Killer for Player 6 (Orange) at (Center of Rect 027 <gen>) facing Default building facing (270.0) degrees
                    Else - Actions
                        Trigger - Run Killer Select <gen> (ignoring conditions)
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                random Equal to 7
            Then - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Player 7 (Green) controller) Equal to User
                    Then - Actions
                        Unit - Create 1 Killer for Player 7 (Green) at (Center of Rect 027 <gen>) facing Default building facing (270.0) degrees
                    Else - Actions
                        Trigger - Run Killer Select <gen> (ignoring conditions)
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                random Equal to 8
            Then - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Player 8 (Pink) controller) Equal to User
                    Then - Actions
                        Unit - Create 1 Killer for Player 8 (Pink) at (Center of Rect 027 <gen>) facing Default building facing (270.0) degrees
                    Else - Actions
                        Trigger - Run Killer Select <gen> (ignoring conditions)
            Else - Actions
                Do nothing
User avatar
Bartimaeus
Tyrannical Drama Queen
Posts: 4430
Joined: November 19th, 2007, 5:05 am
Been thanked: 2 times

Re: Good trigger?

Post by Bartimaeus »

navysealsx wrote:Is this a good trigger? i need to know if there is anything wrong

Code: Select all

Killer Select
    Events
    Conditions
    Actions
        Set random = (Random integer number between 1 and 8 )
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                random Equal to 1
            Then - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Player 1 (Red) controller) Equal to User
                    Then - Actions
                        Unit - Create 1 Killer for Player 1 (Red) at (Center of Rect 027 <gen>) facing Default building facing (270.0) degrees
                    Else - Actions
                        Trigger - Run Killer Select <gen> (ignoring conditions)
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                random Equal to 2
            Then - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Player 2 (Blue) controller) Equal to User
                    Then - Actions
                        Unit - Create 1 Killer for Player 2 (Blue) at (Center of Rect 027 <gen>) facing Default building facing (270.0) degrees
                    Else - Actions
                        Trigger - Run Killer Select <gen> (ignoring conditions)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                random Equal to 3
            Then - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Player 3 (Teal) controller) Equal to User
                    Then - Actions
                        Unit - Create 1 Killer for Player 3 (Teal) at (Center of Rect 027 <gen>) facing Default building facing (270.0) degrees
                    Else - Actions
                        Trigger - Run Killer Select <gen> (ignoring conditions)
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                random Equal to 4
            Then - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Player 4 (Purple) controller) Equal to User
                    Then - Actions
                        Unit - Create 1 Killer for Player 4 (Purple) at (Center of Rect 027 <gen>) facing Default building facing (270.0) degrees
                    Else - Actions
                        Trigger - Run Killer Select <gen> (ignoring conditions)
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                random Equal to 5
            Then - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Player 5 (Yellow) controller) Equal to User
                    Then - Actions
                        Unit - Create 1 Killer for Player 5 (Yellow) at (Center of Rect 027 <gen>) facing Default building facing (270.0) degrees
                    Else - Actions
                        Trigger - Run Killer Select <gen> (ignoring conditions)
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                random Equal to 6
            Then - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Player 6 (Orange) controller) Equal to User
                    Then - Actions
                        Unit - Create 1 Killer for Player 6 (Orange) at (Center of Rect 027 <gen>) facing Default building facing (270.0) degrees
                    Else - Actions
                        Trigger - Run Killer Select <gen> (ignoring conditions)
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                random Equal to 7
            Then - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Player 7 (Green) controller) Equal to User
                    Then - Actions
                        Unit - Create 1 Killer for Player 7 (Green) at (Center of Rect 027 <gen>) facing Default building facing (270.0) degrees
                    Else - Actions
                        Trigger - Run Killer Select <gen> (ignoring conditions)
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                random Equal to 8
            Then - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Player 8 (Pink) controller) Equal to User
                    Then - Actions
                        Unit - Create 1 Killer for Player 8 (Pink) at (Center of Rect 027 <gen>) facing Default building facing (270.0) degrees
                    Else - Actions
                        Trigger - Run Killer Select <gen> (ignoring conditions)
            Else - Actions
                Do nothing

The only thing I can think of is putting it on Initialization. I erased whatever I said before because I relooked at it three times and saw what was wrong with what I said.
Black-Hole
Forum Fanatic
Posts: 315
Joined: October 16th, 2007, 7:32 pm

Re: Good trigger?

Post by Black-Hole »

I thought of having it at game start also... but when the game starts its killing units and makeing other units and alot of otherstuff that this one uses. So i just made it different trigger and made the start run this one
DL.PIGGY
Newcomer
Posts: 15
Joined: May 30th, 2007, 4:19 pm

Re: Good trigger?

Post by DL.PIGGY »

What do you mean by good trigger? you could simplify it using.

set random = random no. btwn 1 and 8

if player[random] status is user
then create 1 blah for player[random] at blah
run <trigger>

where you can find player[random] under "convert player to player index."
Black-Hole
Forum Fanatic
Posts: 315
Joined: October 16th, 2007, 7:32 pm

Re: Good trigger?

Post by Black-Hole »

DL.PIGGY wrote:What do you mean by good trigger? you could simplify it using.

set random = random no. btwn 1 and 8

if player[random] status is user
then create 1 blah for player[random] at blah
run <trigger>

where you can find player[random] under "convert player to player index."
I know its basicly the same trigger the way i did it but in expanded form lol...