Page 1 of 1
Local kills = your own. Possible?
Posted: Tue Apr 03, 2007 6:15 pm
by jangoisbaddest
I created a unit which spawns troops (specifically, a third team composed of five bots). What I would like to know is how to have any kills they earn go toward the person who spawned them (a hero). Obviously there would only be one of him on the field at once, except that I'm incorporating him into a custom Hero Assault. So basically I'm asking if there is any way to make kill credit go to you when team 3 makes a kill.
RE: Local kills = your own. Possible?
Posted: Wed Apr 04, 2007 3:13 am
by [RDH]Zerted
You can give their kills/points to the player's team, but I am not sure how to give them to the physcial player.
Related methods:
SetReinforcementCount()
GetReinforcementCount()
AddReinforcements()
SetTeamPoints()
GetTeamPoints()
AddTeamPoints()
Edit: With a little research I found these:
AddAssaultDestroyPoints(killer)
AddFlagCapturePoints(GetFlagCarrier(flag.name))
AddSpaceAssaultDestroyPoints(killer, GetEntityName(objectPtr))'
Maybe you can use the above methods along with points.lua to give the player extra points. (I would try the FlagCapture one first)
There appears to be a ScriptCB method dealing with player points, but I am not sure if this is meant for shell or game code. ScriptCBs can have a bad effect on MP games, so I am not saying the method name. Find it yourself if nothing else works.