HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Need help with if enemy killed then score +=1

05-04-2004, 09:44 AM#1
SharQueDo
I tried using this:

Events:
- Unit - A unit owned by Player 7 (Green) Dies

Conditions:

Actions:
- Player Group - Pick every player in Group1 and do (If ((Owner of (Picked unit)) Equal to (Owner of (Killing unit))) then do (Set Score[(Player number of (Owner of (Picked unit)))] = (Score[(Player number of(Owner of (Picked unit)))] +1)) else do (Do nothing)


But it doesnt work :(

Got any idea?
05-04-2004, 11:16 AM#2
Kamux
There is no picked unit, so you need to use 'picked player'.
05-04-2004, 01:07 PM#3
SharQueDo
Thnx I got it work:

Events:
- Unit - A unit owned by Player 7 (Green) Dies

Conditions:

Actions:
- Player Group - Pick every player in Group1 and do (If ((Owner of (Killing unit)) Equal to (Picked player))[ then do (Set Score[(Player number of (Picked player))] = (Score[(Player number of(Picked player))] +1)) else do (Do nothing)

:D
05-04-2004, 09:14 PM#4
ThyFlame
Why not just do..

If
--player 7 owns (killing unit)
then
--score = score + 1
else
--do nothing
05-04-2004, 11:14 PM#5
sweet5
that requires more triggers becuz Im guessing he has at least 7 players so if he does it your way thyflame, he will have to have 7 or more varibles and triggers. where this way he only needs 1 varible and 1 trigger, like I said earlier your triggers are very unessicarily difficult somtimes.