When there are two or more players playing in my RPG and one of them kills any unit the points only go to player 1. I can't figure out how to make it go to the player that kills it and I dont want it to be group exp. This is what the trigger looks like:
Players
Heroes
Conditions
Player 7 has suffered at least 1 death of zergling
Actions
Modify Score for current player: add 25 custom
Modify death counts for player 7: set to 0 for zergling
Preserve trigger
Anyone know how to make it so that the preson who kills it gets the points without making 6(the number of possible players) triggers, one for each player.
I'm not experienced in rpg type maps, but I just wana say something. I don't think it is possible from what u r saying. Because from the beginning, the triggers have no way of identifying who killed that zergling.
The way you are doing it is wrong. First of all when a player kills something he gets an amount of "kill score" for killing that unit. So the trigger would work like this:
Conditions:
Current player kill score is at least 25
Actions:
Modify Score for current player: subtract 25 kills
Modify Score for current player: add 25 custom
Preserve trigger
Now you will have to figure out how much each unit is worth. 1 zergling is worth 50 kill scores. If you want exactly one zergling to give 25 custom, all you have to do is change the trigger to this:
Conditions:
Current player kill score is at least 2
Actions:
Modify Score for current player: subtract 2 kills
Modify Score for current player: add 1 custom
Preserve trigger
This makes it give half the regular amount of custom. It might work slow, so use hyper triggers (get them in the downloads section of this site).
The way revelade showed is going to make all your points be relevant since, for example, 25 kill score will equal 25 exp. So if there are 2 enemies that give the same kill score you can add to the conditions "Player has suffered at least 1 death of unit" to recognize which unit actually died. So then you can make 2 units with same kill score give different amounts of experience. Oh and you have to subtract the death in the actions if you do that.
About your original trigger, the unit is killed. Player 1 executes the trigger first, getting the points and subtracting the death before P2 ever even has a chance.
Thanks.
Just 1 question though, lets say player 1 kills 2 zerglings in under the time that starcraft takes to recheck the triggers and I have one trigger for a zergling that subtracts 50 kills and gives custom and one for a devouring one that subtracts 100 kills an adds custom, would it execute the former twice or skip it and go to the latter
Unless you use phatdiddy's method, in which case it won't find and devouring one deaths and will end up on the Zergling trigger anyway.
The Devouring One and Zerglings are two different units. If two Zerglings were killed, it would subtract one and still have one death left over for Player 2.
QUOTE(phatdiddy @ Aug 21 2004, 07:50 AM)
The way revelade showed is going to make all your points be relevant since, for example, 25 kill score will equal 25 exp. So if there are 2 enemies that give the same kill score you can add to the conditions "Player has suffered at least 1 death of unit" to recognize which unit actually died. So then you can make 2 units with same kill score give different amounts of experience. Oh and you have to subtract the death in the actions if you do that.
The problem of what he is saying is there is no way to detect WHO got the kill if you use the the death counts method. However, this would be perfect IF you make an RPG where everyone gets the same exp no matter who kills what.
Crap It hold on I can explain it mine take a few mins to get it right sometimes I'll get triggers like that wrong. Like I say "No one is perfect"
QUOTE(Revelade @ Aug 22 2004, 12:43 AM)
The problem of what he is saying is there is no way to detect WHO got the kill if you use the the death counts method. However, this would be perfect IF you make an RPG where everyone gets the same exp no matter who kills what.
The thing is I usually make seperate triggers for each player and use the actual player instead of current player in the actual trigger fields, so if you have each persons exp be only what they killed (not shared) this can work.
Umm... if you had "player suffers atleast one death of zergling" after that player killed a single zergling that trigger would fire indefinately. To solve this, in the actions of that trigger you need to set deaths of zerglings for that player to 0 to stop the trigger from firing forever.