Hey GT,
I want to know if this is possible to change a vehicule by another on stocks maps via lua, for an era mod without chaging the spawn via Zeroeditor.
Example: I want to change the "rep_walk_oneman_atst" in "uta1c_con" by my custom one, how I can do this?
Add/Change vehicles via lua. [Solved]
Moderator: Moderators
-
CdtFox
- 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:
- AnthonyBF2
- Sith

- Posts: 1255
- Joined: Wed Aug 21, 2013 3:55 pm
- Projects :: PS2+PSP Overhaul
Re: Add/Change vehicles via lua.
I think you can use something like this but cannot confirm;
SetProperty("VehicleSpawn", "ClassAllDEF", "all_fly_snowspeeder")
VehicleSpawn = the name of the vehicle spawn you're wanting to edit. If that doesn't work there is also SetClassProperty.
SetProperty("VehicleSpawn", "ClassAllDEF", "all_fly_snowspeeder")
VehicleSpawn = the name of the vehicle spawn you're wanting to edit. If that doesn't work there is also SetClassProperty.
-
CdtFox
- 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: Add/Change vehicles via lua.
Tried both, but the AT-ST is still spawningAnthonyBF2 wrote:I think you can use something like this but cannot confirm;
SetProperty("VehicleSpawn", "ClassAllDEF", "all_fly_snowspeeder")
VehicleSpawn = the name of the vehicle spawn you're wanting to edit. If that doesn't work there is also SetClassProperty.
Where "SetProperty"/"SetClassProperty" should go? I've putted just after "SetMemoryPoolSize"
-
thelegend
- Sith

- Posts: 1433
- Joined: Thu Jan 23, 2014 6:01 am
- Projects :: Star Wars - Battlefront III Legacy
- xbox live or psn: El_Fabricio#
- Location: Right behind you :)
Re: Add/Change vehicles via lua.
Does SetInstanceProperty actually exist? For command posts spawn paths can be switched via SetProperty.
By the way you need to put these Property lines below function scriptpostload to run them.
By the way you need to put these Property lines below function scriptpostload to run them.
- Teancum
- Jedi Admin

- Posts: 11080
- Joined: Wed Sep 07, 2005 11:42 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Indiana
Re: Add/Change vehicles via lua.
Nope. But it would be super useful if it did exist. Years ago I pulled all every LUA command from the game engine with a hex editor script. You can find them in the following topic: http://www.gametoast.com/viewtopic.php?f=27&t=12469thelegend wrote:Does SetInstanceProperty actually exist?
-
AQT
- Gametoast Staff

- Posts: 4910
- Joined: Sat Nov 03, 2007 4:55 pm
- Location: SoCal, USA
Re: Add/Change vehicles via lua.
Similar topics found via the search function:
viewtopic.php?p=400929
viewtopic.php?f=27&t=29909
First topic indicates that using SetProperty does not work on vehicle spawns. Second topic details the steps needed to implement new vehicle spawns without having to load an entire edited stock map.
viewtopic.php?p=400929
viewtopic.php?f=27&t=29909
First topic indicates that using SetProperty does not work on vehicle spawns. Second topic details the steps needed to implement new vehicle spawns without having to load an entire edited stock map.
-
CdtFox
- 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: Add/Change vehicles via lua.
Waoo, graet AQT! Thanks!AQT wrote:Similar topics found via the search function:
viewtopic.php?p=400929
viewtopic.php?f=27&t=29909
First topic indicates that using SetProperty does not work on vehicle spawns. Second topic details the steps needed to implement new vehicle spawns without having to load an entire edited stock map.
