Page 1 of 1
Change models through script?
Posted: Tue Mar 14, 2017 4:02 pm
by CdtFox
I was wondering if with some codes such as "SetClassProperty" or "SetProperty" i can change the model of the unit. As far as i remember this code go directly after "ScriptInit()" right?
If so, how i can i tell the readme to read the corresponding .lvl where the model is?
Re: Change models through script?
Posted: Tue Mar 14, 2017 5:07 pm
by ARCTroopaNate
Your model needs to be loaded into a .req file called by the lua to be used, and yes, setclassproperty is what you want here. if you wanted to change the model of the clone rocketeer to that of the clone trooper you'd have to make sure the clone trooper is called for under readdatafile:rep.lvl and then use setclassproperty.
Re: Change models through script?
Posted: Wed Mar 15, 2017 2:58 pm
by CdtFox
ARCTroopaNate wrote:Your model needs to be loaded into a .req file called by the lua to be used, and yes, setclassproperty is what you want here. if you wanted to change the model of the clone rocketeer to that of the clone trooper you'd have to make sure the clone trooper is called for under readdatafile:rep.lvl and then use setclassproperty.
So the model should be loaded loaded directly in the req file, like 1st person models?
Also how can i use this code to change the weapons used by the unit? I tried different ways, but well i'm a bit lost.

Re: Change models through script?
Posted: Wed Mar 15, 2017 3:52 pm
by ARCTroopaNate
I don't have access to my modding computer but it's setclassproperty, weaponname1, "rep_weap_inf_rifle" or something like that to change to republic rifle. The model can either be loaded directly into the req or you can load a unit in that uses that model.
Re: Change models through script?
Posted: Thu Mar 16, 2017 2:23 am
by CdtFox
ARCTroopaNate wrote:I don't have access to my modding computer but it's setclassproperty, weaponname1, "rep_weap_inf_rifle" or something like that to change to republic rifle. The model can either be loaded directly into the req or you can load a unit in that uses that model.
Perfect thank you nate

Re: Change models through script?
Posted: Thu Mar 16, 2017 8:53 am
by ARCTroopaNate
no problem
