| 12-31-2003, 04:45 AM | #1 |
im making a racing map and i coudnt figure out how to make this kind of trigger how do u make it like the first person to cross the "finish line" gets gold for each race? im going to have about 10 races |
| 12-31-2003, 10:34 AM | #2 |
you'd want an integer variable called position, or something like that. Initial value of the integer is 1 try this Event: Unit enters (finish line) Action: If Then Else. (multiple actions) If the integer variable is equal to 1, Then display text to player (owner of triggering unit) ("You placed number + String(integer variable") Add 3 to player score (on leaderboard) Set (integer variable) to 2 Else: Another IF THEN ELSE (multiple actions) If the integer variable is equal to 2 Then display text to player (owner of triggering unit) ("You placed number + String(integer variable") Add 2 to player score (on leaderboard) Set (integer variable) to 3 Else: ANOTHER IF THEN ELSE (multi act) If the integer variable is equal to 3 Then display text to player (owner of triggering unit) (Concatenate Strings(("You placed number + String(integer variable")) Add 1 to player score (on leaderboard) Remove all other units. Display text to all players (The Race is over!) Set Integer Variable to 0 Else: Do Nothing if you can make sense of that 20 line rabble, you get a cookie. |
| 12-31-2003, 11:21 AM | #3 |
thank u ill try it |
| 12-31-2003, 02:00 PM | #4 |
Event-unit enters finish line action -add xx gold to owner of entering unit Turn off this trigger |
| 12-31-2003, 02:32 PM | #5 |
what if he have included laps =?` i would make the trigger like this... E: A unit Enters Checkpoint C: A: if Lap is equal to 4 then run "victory" checking conditions for owner of entering unit set PLayer = owner of entering unit else set Lap = Lap +1 Victory: E: C: Lap is equal to 4 A: Display text PLayer "you placed <PLACED> set PLACED = PLACED + 1 |
| 12-31-2003, 02:53 PM | #6 |
thank u everyone :D :foot: |
