Local kills = your own. Possible?

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
User avatar
jangoisbaddest
Lieutenant General
Lieutenant General
Posts: 661
Joined: Mon Feb 27, 2006 12:10 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: All Along The Watchtower

Local kills = your own. Possible?

Post 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.
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

RE: Local kills = your own. Possible?

Post 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.
Post Reply