Posted: Fri Jul 06, 2007 11:04 pm
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.
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.