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?
Change models through script?
Moderator: Moderators
-
- 2nd Lieutenant
- Posts: 379
- Joined: Wed Feb 17, 2016 8:51 am
- Projects :: BUC and Designated Days
- xbox live or psn: No gamertag set
- Location: France
- Contact:
-
- Jedi
- Posts: 1161
- Joined: Mon Mar 21, 2011 8:12 pm
- Projects :: Star Wars Battlefront - Tides of War
- xbox live or psn: I have ps4
- Location: STALKER!
- Contact:
Re: Change models through script?
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.
-
- 2nd Lieutenant
- Posts: 379
- Joined: Wed Feb 17, 2016 8:51 am
- Projects :: BUC and Designated Days
- xbox live or psn: No gamertag set
- Location: France
- Contact:
Re: Change models through script?
So the model should be loaded loaded directly in the req file, like 1st person models?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.
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.
-
- Jedi
- Posts: 1161
- Joined: Mon Mar 21, 2011 8:12 pm
- Projects :: Star Wars Battlefront - Tides of War
- xbox live or psn: I have ps4
- Location: STALKER!
- Contact:
Re: Change models through script?
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.
-
- 2nd Lieutenant
- Posts: 379
- Joined: Wed Feb 17, 2016 8:51 am
- Projects :: BUC and Designated Days
- xbox live or psn: No gamertag set
- Location: France
- Contact:
Re: Change models through script?
Perfect thank you nateARCTroopaNate 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.
-
- Jedi
- Posts: 1161
- Joined: Mon Mar 21, 2011 8:12 pm
- Projects :: Star Wars Battlefront - Tides of War
- xbox live or psn: I have ps4
- Location: STALKER!
- Contact:
Re: Change models through script?
no problem