Change mesh with lua event

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
ForceMaster
Lieutenant General
Lieutenant General
Posts: 737
Joined: Fri Aug 08, 2008 11:27 pm
Projects :: Tron The Grid
Games I'm Playing :: The best..SWBFII
xbox live or psn: No gamertag set
Location: C:\Program Files\ForceMaster\Bin\ForceMaster.exe

Change mesh with lua event

Post by ForceMaster »

Hi, I need an lua event that change the mesh of an flyer when dispense an vehicle. It is for an laatc that drops (dispense) an atte, so the first mesh will have the atte mesh under the laatc and the second will haven't it. Someone can helpme? thanks!

EDIT: I found an code that works perfectly replacing the mesh but in the new spawned vehicles, so not work with the acutal loaded vehicles

Code: Select all

OnCharacterDispenseControllable(
 function (player, controllable)
SetClassProperty("rep_fly_laatc", "GeometryName", "rep_fly_laatc_drop")
end
)
There is any way to get these mesh ghange in the actual unit that fires the weapon?
Post Reply