Disguise Kit Question [Solved]

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

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:

Post by [RDH]Zerted »

Use can use the SetProperty() methods to change weapons, skins, unit abilities, the team, the perceived team, any ODF value, etc... You can use these to create your own, custom disguise weapons through the lua.

Examples:
Set<target game type>Property( <target>, "Team", 2 ) --puts target on team 2
Set<target game type>Property( <target>, "PerceivedTeam", 1 ) --makes target look like on team 1, but really still on team 2
where <target game type> = (nothing), Class, Object, or Entity

Other methods of intrest:
SelectCharacterTeam() --change a character's team
SelectCharacterClass() --change a character's unit class
SpawnCharacter() --spawn a character

---------------

You could track a certain character class, lets say a pilot unit, using OnCharacterSpawn(). When a human spawns as this unit, you could force spawn an AT-ST and force the player to enter the new vehicle. If the player tried to leave the vehicle, you could kill them both. This would give you the effect of spawning as an AT-ST. Just use a different pilot character for each type of vehicle you want to spawn as.
Alpha-17
Master Sergeant
Master Sergeant
Posts: 165
Joined: Mon Jan 22, 2007 2:26 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Post by Alpha-17 »

Ok I can give somebody the disguise kit ... As a weapon ??
And how could I change something , eg a clone with a rock ? Should I write something in the disguise-odf ?
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:

Post by [RDH]Zerted »

I don't know anything about the shipped disguise kit. I'm saying you could make a weapon (through mostly lua coding) that changes something about the unit who fired it (like its skin and its perceived team, which is what the disguise kit is supposed to do?) or (I think) the unit that got hit by it.

A clone with a rock... What does that mean?
Post Reply