Anyone know how to give players points?

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
[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:

Anyone know how to give players points?

Post by [RDH]Zerted »

I'm almost finished with my Deathmatch game mode. The main problem I'm having is that I can't award anyone doing good. I haven't been able to figure out how to give a player some extra points. Does anyone have any ideas on how to do this?
xwingguy

Post by xwingguy »

I found this in ObjectiveSpaceAssault. It's the only thing like it that I can find:

Code: Select all

AddSpaceAssaultDestroyPoints(killer, GetEntityName(objectPtr))
He's it's context:

Code: Select all

	OnObjectKillName(
		function (objectPtr, killer)
			self:OnCriticalSystemDestroyed(name, pointValue)
			AddSpaceAssaultDestroyPoints(killer, GetEntityName(objectPtr))
			SetProperty(objectPtr, "MaxHealth", 99999999999.0)		--effectively makes the object un-repairable
			self:UpdateObjectiveMessage(name)
		end,
		name
		)
NOTE: It may also require that this line exists. I can't find AddSpaceAssaultDestroyPoints() is defined so I assume that you need this line before it is used.

Code: Select all

SpaceAssaultEnable(true)	


Edit: Wow...I just noticed that you could ask for the objectPtr instead of just object....
Post Reply