| 08-24-2004, 05:21 PM | #1 |
in my map similar to paintball... when a unit carrying a flag to his base, gets killed on the way, how do i make the flag move back to the opponents base. |
| 08-24-2004, 05:29 PM | #2 |
Pretty easy, Code:
flagdrop1
Events
Unit - A unit owned by Player 1 (Red) Dies
Unit - A unit owned by Player 2 (Blue) Dies
Unit - A unit owned by Player 3 (Teal) Dies
Unit - A unit owned by Player 4 (Purple) Dies
Unit - A unit owned by Player 5 (Yellow) Dies
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Dying unit) has an item of type Flag2) Equal to True
Then - Actions
For each (Integer A) from 1 to 6, do (Item - Remove (Item carried by (Dying unit) of type Flag2))
Create 1 Flag2 at center of Flag2 <gen> Facing Angle x.
Else - ActionsX = whatever angle you want the flag to point Flag2 <gen> is a rect you place on the map where you want the flag to go. Now this is just for Team1, for team two, make an item called Flag 1, which would be team 1's flag, and the rect would be Flag1 <gen>, and make the rect where you want Team 1's flag to go. |
| 08-24-2004, 11:28 PM | #3 |
that didnt work... :( |
| 08-25-2004, 12:46 AM | #4 |
You didn't set it to Tome of Experience like i had it in the trigger before I edited it.. did you? |
| 08-25-2004, 01:35 AM | #5 |
All you'll need: Code:
Melee Initialization
Events
Unit - A unit Dies
Conditions
Or - Any (Conditions) are true
Conditions
((Triggering unit) has an item of type Flag1) Equal to True
((Triggering unit) has an item of type Flag2) Equal to True
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Owner of (Triggering unit)) is in (Team1)) Equal to True
Then - Actions
Item - Create Flag2 at (Center of (Team2 flag <gen>))
Item - Remove (Item carried by (Triggering unit) of type Flag2)
Else - Actions
Item - Create Flag1 at (Center of (Team1 flag <gen>))
Item - Remove (Item carried by (Triggering unit) of type Flag1)This, of course, would screw up with backstabbing. |
| 08-25-2004, 02:43 AM | #6 |
is there a way to turn friendly fire off? a way to make friendly units invulnerable? |
| 08-25-2004, 03:28 AM | #7 |
Code:
Melee Initialization
Events
Unit - A unit Is issued an order targeting an object
Conditions
Or - Any (Conditions) are true
Conditions
And - All (Conditions) are true
Conditions
(Issued order) Equal to (Order(attack))
((Owner of (Ordered unit)) is in (Team2)) Equal to True
((Owner of (Target unit of issued order)) is in (Team2)) Equal to True
And - All (Conditions) are true
Conditions
(Issued order) Equal to (Order(attack))
((Owner of (Ordered unit)) is in (Team1)) Equal to True
((Owner of (Target unit of issued order)) is in (Team1)) Equal to True
Actions
Unit - Order (Ordered unit) to Stop |
| 08-31-2004, 05:44 PM | #8 | |
Quote:
for the event... i can't have just Unit - A unit Is issued an order targeting an object it has to be Unit - A unit owned by Player 1 (Red) Is issued an order targeting an object so how would i do it now? have a condition for each player? edit: sorry sorry, my bad... I found it |
| 08-31-2004, 05:59 PM | #9 |
It is generic unit event unless you are in RoC , in that case just make the trigger have 12 events, one for each player |
| 08-31-2004, 06:03 PM | #10 |
Code:
((Owner of (Ordered unit)) is in (Team2)) Equal to True
((Owner of (Target unit of issued order)) is in (Team2)) Equal to Truehow do i make those? I can't find them |
| 09-01-2004, 09:02 PM | #11 |
Boolean Comparison ---> Player is in player group |
