Page 1 of 1

Spawning vehicles

Posted: Sat Feb 25, 2006 9:09 am
by Darth-Derkie
I'm having trouble spawning vehicles. ATTE's are spawning, but other vehicles don't.

.lua:
function ScriptInit()

ReadDataFile("ingame.lvl")


SetMaxFlyHeight(90)
SetMaxPlayerFlyHeight (90)

SetMemoryPoolSize ("ClothData",20)
SetMemoryPoolSize ("Combo",50) -- should be ~ 2x number of jedi classes
SetMemoryPoolSize ("Combo::State",650) -- should be ~12x #Combo
SetMemoryPoolSize ("Combo::Transition",650) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Condition",650) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Attack",550) -- should be ~8-12x #Combo
SetMemoryPoolSize ("Combo::DamageSample",6000) -- should be ~8-12x #Combo::Attack
SetMemoryPoolSize ("Combo::Deflect",100) -- should be ~1x #combo

ReadDataFile("sound\\geo.lvl;geo1cw")
ReadDataFile("dc:SIDE\\cis.lvl",
"cis_fly_geofighter")
ReadDataFile("SIDE\\rep.lvl",
"rep_inf_ep3_rifleman",
"rep_inf_ep3_rocketeer",
"rep_inf_ep3_engineer",
"rep_inf_ep3_sniper",
"rep_inf_ep3_officer",
"rep_walk_atte", .spawning
"rep_fly_gunship", .NOT spawning
"rep_inf_ep3_jettrooper",
"rep_hover_fightertank",
"rep_hero_macewindu",
"rep_hover_barcspeeder")
ReadDataFile("SIDE\\cis.lvl",
"cis_inf_rifleman",
"cis_inf_rocketeer",
"cis_inf_engineer",
"cis_inf_sniper",
"cis_inf_officer",
"cis_inf_droideka",
"cis_hero_countdooku",
"cis_tread_hailfire", .NOT spawning
"cis_walk_spider", .NOT spawning
"cis_hover_aat")
ReadDataFile("SIDE\\geo.lvl",
"gen_inf_geonosian")

Memorypools:

-- Level Stats
-- ClearWalkers()
AddWalkerType(0, 4) -- special -> droidekas
AddWalkerType(2, 3) -- 2 spider walkers with 2 leg pairs each
AddWalkerType(3, 0) -- 2 attes with 3 leg pairs each
local weaponCnt = 1024
SetMemoryPoolSize("Aimer", 75)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 1024)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 32)
SetMemoryPoolSize("EntityFlyer", 32)
SetMemoryPoolSize("EntityHover", 64)
SetMemoryPoolSize("EntityLight", 200)
SetMemoryPoolSize("EntityFlyer", 36)
SetMemoryPoolSize("EntitySoundStream", 4)
SetMemoryPoolSize("EntitySoundStatic", 32)
SetMemoryPoolSize("MountedTurret", 180)
SetMemoryPoolSize("Navigator", 128)
SetMemoryPoolSize("Obstacle", 1024)
SetMemoryPoolSize("PathNode", 1024)
SetMemoryPoolSize("SoundSpaceRegion", 64)
SetMemoryPoolSize("TreeGridStack", 1024)
SetMemoryPoolSize("UnitAgent", 128)
SetMemoryPoolSize("UnitController", 128)
SetMemoryPoolSize("Weapon", weaponCnt)
SetMemoryPoolSize("CommandWalker", 2)

Screenshot of a spawn point for the hailfire:

My picture uploading site is offline, I'll post screenshots later

Posted: Sat Feb 25, 2006 9:51 am
by Darth-Derkie
Ok settings in Zeroedit:
ImageImageImage

Control region:
Image

I used imageshack... I like http://www.maj.com much better, faster in uploading.

Posted: Sat Feb 25, 2006 10:54 am
by Dragonum
i think the problem is, that you CP is called CP13 and in the vehicle spawn you write cp13.

Posted: Sat Feb 25, 2006 11:17 am
by Darth-Derkie
No I renamed them both again and gave them the exact same name, but still no Hailfire, or Spider Walkers, or Gunships.

Posted: Sat Feb 25, 2006 12:22 pm
by Teancum
Hit the 'page down' button in the 'object instance' window and make sure you filled out both the ATK and DEF values for each faction.

Posted: Sat Feb 25, 2006 1:16 pm
by uknightbreed
hi all ,my first post ! concerning the vehicle spawn,i had the same trouble !
in your coding ,you have '-- ClearWalkers() '.take off the '-- ' leaving just clear walkers.
hope that sorts it.
im a noob myself to this ,so not sure if im right ,but thats my guess.

Posted: Sat Feb 25, 2006 1:19 pm
by Teancum
Actually, ClearWakers() removes all walkers from the map.

Welcome to GT, Uknightbreed.

Posted: Sat Feb 25, 2006 1:22 pm
by uknightbreed
also the coding after ......

on my map script i have.........

AddWalkerType(1, 4) -- 1x2 (1 pair of legs)
AddWalkerType(2, 4) -- 2x2 (2 pairs of legs)
AddWalkerType(3, 1) -- 3x2 (3 pairs of legs)

which works fine.i havnt typed in the vehicle names on this script part like you.

again ,i may not be right as im a noob,but its works for me.

Posted: Sat Feb 25, 2006 1:40 pm
by Darth-Derkie
I now have the values put in both ATK and DEF, but still they're not spawning
:(

I had only put in DEF, because CIS is the DEF team, and republic ATK.

Posted: Sat Feb 25, 2006 1:56 pm
by Darth-Derkie
Ok, I fixed it! :D:D:D

I saw that the ATTE spawn points were assigned to team 1, republic. The other were assigned to team 0, nothing. So I assigned all spawn points to a team, and it worked!

Image

Posted: Sat Feb 25, 2006 2:12 pm
by Teancum
You do need to fix the memory pool for the AT-TE's though so we don't crash.

AddWalkerType(3, 0) --change the last number to the number of AT-TE's in the map (the first number referers to the pairs of legs a walker has)

Posted: Sat Feb 25, 2006 2:42 pm
by squipple
Is there a list of all the zeroedit vehicle names somewhere?

Posted: Sat Feb 25, 2006 4:45 pm
by Leviathan
squipple, as far as I know, such a list hasn't been written yet...
However, you can do it yourself by looking at the following path : "[Side's label]\REQ". There, you'll find vehicles' *.REQ files, whose label respects this synthax : "[Side's prefix]_[Class of vehicles ("fly", "hover", "walker", etc...)]_[Name of the vehicle]"