HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

!Will This Work???!

08-27-2004, 01:05 PM#1
shadowhunter09
Will this work?
I'm trying to make it so that when a unit is killed by a player, it adds +25 lumber to the player and his allies and NOT the other players, but I just can't seem to find a way to make this work. :P. So far I have:
EVENTS:
Red Dragon (blah blah blah) Dies
CONDITIONS:
Or- Any (Conditions) are True
-Conditions
(Owner of (killing unit)) Equal to (Random Player from Player Group- 1 Red (Owner of (killing unit)) Equal to (Random Player from Player Group- 2 Blue
(Owner of (killing unit)) Equal to (Random Player from Player Group- 4 Purple
ACTIONS:
(I don't know what to put here :))
08-27-2004, 01:34 PM#2
AFB-DieHard
I would remove the conditions and make the actions something like this:

if (Owner of (killing unit)) Equal to player1 or player2 then Player - Add 25 to Player 1 (Red) Current lumber and Player - Add 25 to Player 2 (Red) Current lumber

if (Owner of (killing unit)) Equal to player3 or player4 then Player - Add 25 to Player 3 (Red) Current lumber and Player - Add 25 to Player 4 (Red) Current lumber

and so on
08-27-2004, 01:37 PM#3
SpadeZ
Heres an example of how it should look.

Code:
    Events
        Unit - A unit Dies
    Conditions
        (Unit-type of (Triggering unit)) Equal to UNIT
        ((Owner of (Killing unit)) is in (PLAYER GROUP)) Equal to True
    Actions
        Player - Set (Owner of (Killing unit)) Current lumber to (((Owner of (Killing unit)) Current lumber) + 25)
        Player Group - Pick every player in (All allies of (Owner of (Killing unit))) and do (Actions)
            Loop - Actions
                Player - Set (Picked player) Current lumber to (((Picked player) Current lumber) + 25)

Hope this helps
09-06-2004, 05:44 PM#4
shadowhunter09
Thanks it works now. :).