Vehicle spawn properties in lua

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
Abiter_b

Vehicle spawn properties in lua

Post by Abiter_b »

I'm tryin to make a 2nd version of geonosis with both eras without having to put a world into the addon folder. It works fine but i tryed to make the gcw vehicles spawn by setting the vehicle spawns properties in the lua using this code(and a few variations of it for the diferent spawns and vehicles):

Code: Select all

	SetProperty("ATTE1", "ClassImpAtk", imp_walk_atat)
but it they didn't appear in game so i looked at the error log and it came up with this:

Code: Select all

Message Severity: 2
.\Source\LuaCallbacks_Mission.cpp(635)
Entity "ATTE1" not found
i know the vehicle spawn names are right because i looked them up in the world file in the assets and in the lvl file in the game.
Anyone got any ideas why?

thx, Abiter
MercuryNoodles
Jedi
Jedi
Posts: 1003
Joined: Sun Mar 12, 2006 7:16 pm
Projects :: Space - Boarding Action
xbox live or psn: No gamertag set

Post by MercuryNoodles »

Why are you doing this via lua? Wouldn't adding the AT-AT to the ClassImpAtk space in the vehicle spawn properties through ZE do the job?
Ace_Azzameen_5
Jedi
Jedi
Posts: 1119
Joined: Sat Apr 23, 2005 8:52 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Post by Ace_Azzameen_5 »

He doesn't want to put a World in the addon folder. Just an addme and a small lvl file with just a LUA script, to save space.

Does your mod load the right layers, does it work at all?
Abiter_b

Post by Abiter_b »

ya i loads the right layer and everything works its just it cant seem to find the vehicle spawns.
MercuryNoodles
Jedi
Jedi
Posts: 1003
Joined: Sun Mar 12, 2006 7:16 pm
Projects :: Space - Boarding Action
xbox live or psn: No gamertag set

Post by MercuryNoodles »

I was under the impression it might be a replacement for the stock map, hence the question.

Is there any sort of case sensitivity that might come into play? Also, is command properly coded? I see the unit odf specified isn't in quotes, but that may be my lacking experience with scripts talking.
Abiter_b

Post by Abiter_b »

i tryed them with all caps and caps at the start and stuff and the vehicle used to b in quotes but that didnt work so i tryed without
Post Reply