Vehicle spawn problem(could use help)

Post everything from general questions, to modding questions, to map WIPs to releases. (SWBF1 only)

Moderator: Moderators

Post Reply
User avatar
newguy99
Command Sergeant Major
Command Sergeant Major
Posts: 254
Joined: Sun Apr 19, 2009 10:58 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Vehicle spawn problem(could use help)

Post by newguy99 »

I'm having trouble with my vehicle spawn(actually they won't even spawn at all). I've been following the "How to Add Vehicles to Your Map for SWBF" tutorial
here is lua reference stuff:
Hidden/Spoiler:
ReadDataFile("dc:SIDE\\rep.lvl",
"rep_inf_basic",
"rep_fly_gunship",
"rep_inf_macewindu",
"rep_inf_jet_trooper");

SetTeamName(REP, "Republic")
SetTeamIcon(REP, "rep_icon")
AddUnitClass(REP, "rep_inf_clone_trooper",10)
AddUnitClass(REP, "rep_inf_arc_trooper",1)
AddUnitClass(REP, "rep_inf_clone_pilot",2)
AddUnitClass(REP, "rep_inf_clone_sharpshooter",2)
AddUnitClass(REP, "rep_inf_jet_trooper",1)
SetHeroClass(REP, "rep_inf_macewindu")

SetMemoryPoolSize("EntityHover", 0)
SetMemoryPoolSize("EntityFlyer", 5)
SetMemoryPoolSize("PowerupItem", 60)
SetMemoryPoolSize("EntityMine", 40)
also here is a pic of the spawn entity in ze:
Hidden/Spoiler:
Image
TY again for any help that can be spared
Last edited by newguy99 on Wed Jul 29, 2009 7:03 am, edited 1 time in total.
Pelt
Private Recruit
Posts: 29
Joined: Thu Apr 09, 2009 12:07 am

Re: Vehicle spawn problem

Post by Pelt »

The vehicle will only spawn if the Republic is attacking due to the way your vehicle spawn has been set up, so make sure the Republic is the attacker.
User avatar
Jendo7
Sith
Sith
Posts: 1304
Joined: Wed Apr 01, 2009 6:37 pm
Location: Cambridge, England.
Contact:

Re: Vehicle spawn problem

Post by Jendo7 »

newguy99 wrote:I'm having trouble with my vehicle spawn(actually they won't even spawn at all). I've been following the "How to Add Vehicles to Your Map for SWBF" tutorial
here is lua reference stuff:
Hidden/Spoiler:
ReadDataFile("dc:SIDE\\rep.lvl",
"rep_inf_basic",
"rep_fly_gunship",
"rep_inf_macewindu",
"rep_inf_jet_trooper");

SetTeamName(REP, "Republic")
SetTeamIcon(REP, "rep_icon")
AddUnitClass(REP, "rep_inf_clone_trooper",10)
AddUnitClass(REP, "rep_inf_arc_trooper",1)
AddUnitClass(REP, "rep_inf_clone_pilot",2)
AddUnitClass(REP, "rep_inf_clone_sharpshooter",2)
AddUnitClass(REP, "rep_inf_jet_trooper",1)
SetHeroClass(REP, "rep_inf_macewindu")

SetMemoryPoolSize("EntityHover", 0)
SetMemoryPoolSize("EntityFlyer", 5)
SetMemoryPoolSize("PowerupItem", 60)
SetMemoryPoolSize("EntityMine", 40)
also here is a pic of the spawn entity in ze:
Hidden/Spoiler:
Image
TY again for any help that can be spared
Better still, just put rep_fly_gunship in ClassRepDef (Page On), as Team 2 (Rep/Imp) are usually set as the defending team in the LUA. Either that or change the LUA to show them as attackers, which is what Pelt suggested.
User avatar
newguy99
Command Sergeant Major
Command Sergeant Major
Posts: 254
Joined: Sun Apr 19, 2009 10:58 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Re: Vehicle spawn problem

Post by newguy99 »

Ok, cool I guess I get it.
so if I put the spawn inside of cp2's control zone(cp2 is rep owned)
Then the vehicle would spawn?
TY for the help I try switching att and def in .lua
User avatar
IronJaw
Sergeant Major
Sergeant Major
Posts: 225
Joined: Tue Jul 14, 2009 8:33 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Look behind you, I'm with four other ninjas

Re: Vehicle spawn problem

Post by IronJaw »

What would happen if you put rep_Fly_gunship in all of the class***attack? I read the "Getting Started" tutorial that came with the "Mod Tools", but it didn't go into much detail as to what the class***attack was.
User avatar
newguy99
Command Sergeant Major
Command Sergeant Major
Posts: 254
Joined: Sun Apr 19, 2009 10:58 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Re: Vehicle spawn problem

Post by newguy99 »

It could work, but I don't think so as the class*** stands for class(rep, cis, imp, or all) and not all of those teams have a vehicle with the same name as rep_fly_gunship therefore the pc would look for the vehicle in the wrong folder where there is no vehicle with that name.

I'm not quite sure, but I do have another plan that I hope to try and will try to report back if the problem is fixed.

Well my plan of placing the vehicle spawn inside of cp2 control zone(which is rep) and then renaming the spawn point's cp zone to cp2 didn't work I got this error:
Hidden/Spoiler:
Message Severity: 3
D:\src\FRONTLINE_PC\FrontLine\Source\LuaScript.cpp(1951)
error: attempt to concat field `CurButton' (a nil value)
stack traceback:
1: function `ifs_missionselect_fnAddMap' [(none)]
2: function <781:(none)>
Is this a problem to do with vehicles or is it something else?
TY
User avatar
newguy99
Command Sergeant Major
Command Sergeant Major
Posts: 254
Joined: Sun Apr 19, 2009 10:58 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

I still need help with vehicles

Post by newguy99 »

I've been trying to get vehicle into my maps for a while and if anyone wants to, I'd be happy
send them a downsized version of my map to look at for problem/error/bad lua etc...
Please someone respond even if you not sure of the answer.
Here is the original thread:
Vehicle spawn problem

I got this error after putting in a jedifighter and changing the ClassRepDef part:
Hidden/Spoiler:
Message Severity: 2
D:\src\FRONTLINE_PC\FrontLine\Source\VehicleSpawn.cpp(171)
Vehicle spawn missing class "rep_fly_jedifighter"
ggctuk I was just going to find the url and summited the post without the link.
It's updated now.
p.s. ok I'll try it ggctuk and TY for the response.


YES!!!
YES!!!!
YES!!!!!
TY one and all for the answers and responses because,
I finally got it working and
the fix was placing the name of the spawning vehicle into "ClassRepDef" under "page Dn" in the vehicle spawn entity in zeroeditor!

Topics merged, it's best to keep it together - Staff
Last edited by newguy99 on Fri Aug 21, 2009 2:27 pm, edited 7 times in total.
User avatar
giftheck
Droid Pilot Assassin
Droid Pilot Assassin
Posts: 2218
Joined: Mon Jan 19, 2009 5:58 pm
Projects :: Star Wars Battlefront Anniversary

Re: I still need help with vehicles

Post by giftheck »

EDIT II: Topics merged so this first part was useless.

EDIT: I'm not sure if the Gunship is classed as a Hover. The Geonosis and Bespin LUAs seem to have this anyways, so I'd say try adding a number to that.
Post Reply