Staredit Network

Staredit Network -> UMS Assistance -> Points Gaining To The Person Killing The Units
Report, edit, etc...Posted by Staredit.Net Essence on 2004-08-21 at 06:09:30
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.
Report, edit, etc...Posted by Screwed on 2004-08-21 at 06:35:21
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.
Report, edit, etc...Posted by Revelade on 2004-08-21 at 07:37:19
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).
Report, edit, etc...Posted by phatdiddy on 2004-08-21 at 08:50:19
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.
Report, edit, etc...Posted by Mini Moose 2707 on 2004-08-21 at 13:13:51
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.
Report, edit, etc...Posted by Staredit.Net Essence on 2004-08-21 at 13:46:13
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
Report, edit, etc...Posted by EzDay281 on 2004-08-21 at 13:51:48
Latter, I believe
Report, edit, etc...Posted by Stereo on 2004-08-21 at 14:18:09
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.
Report, edit, etc...Posted by Staredit.Net Essence on 2004-08-21 at 14:43:03
Ok thanks for the info
Report, edit, etc...Posted by Mini Moose 2707 on 2004-08-21 at 15:19:32
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.
Report, edit, etc...Posted by Revelade on 2004-08-22 at 01:43:43
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.
Report, edit, etc...Posted by TSoldier_Wol[f] on 2004-08-22 at 01:53:45
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"
Report, edit, etc...Posted by phatdiddy on 2004-08-22 at 08:35:48
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.
Report, edit, etc...Posted by FaZ- on 2004-08-22 at 13:32:09
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.
Next Page (1)