Local kills = your own. Possible?
Moderator: Moderators
- jangoisbaddest
- Lieutenant General

- Posts: 661
- Joined: Mon Feb 27, 2006 12:10 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: All Along The Watchtower
Local kills = your own. Possible?
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.
- [RDH]Zerted
- Gametoast Staff

- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
RE: Local kills = your own. Possible?
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.
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.
