Page 1 of 1

Vehicle spawn problem(could use help)

Posted: Mon Jul 27, 2009 10:23 pm
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

Re: Vehicle spawn problem

Posted: Tue Jul 28, 2009 3:03 am
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.

Re: Vehicle spawn problem

Posted: Tue Jul 28, 2009 4:31 am
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.

Re: Vehicle spawn problem

Posted: Tue Jul 28, 2009 7:05 am
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

Re: Vehicle spawn problem

Posted: Tue Jul 28, 2009 9:17 am
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.

Re: Vehicle spawn problem

Posted: Tue Jul 28, 2009 9:21 am
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

I still need help with vehicles

Posted: Fri Aug 21, 2009 1:50 pm
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

Re: I still need help with vehicles

Posted: Fri Aug 21, 2009 1:52 pm
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.