Page 1 of 1

Vehicle Spawning

Posted: Mon Mar 13, 2006 9:46 am
by Emraz
I can hear the sighs now ! I have read the documentation 'getting started' my little grey arrow pops up just fine I set it then fill in the instances box as instructed but dont get nothing. Yeas I have also gone to page dwn.

Suspicions : Havent looked into how to set sides so maybe program doesnt know what side is 1 etc.

Have tried to only use the files I need so havent transferred whole worlds over.. so may need some bits n bobs :-).

I have looked for a thread but only came across problems with spawning particular vehicles.

Thanks to those who have cracked the workings of these tools for your ongoing patience and valuable answers to us' How the hell do you do that crew.'

RE: Vehicle Spawning

Posted: Mon Mar 13, 2006 10:29 am
by Rends
*sighs*

*sighs*

;-)

Tip1: read the docs
tip2: check shipped game lua scripts and maps in Zeroeditor.

If nothing helps:

1. Add the vehicle to the side in your lua
2. check which side is attacker and wich defender.
3. set vehicle memory pools in the lua
4 In Zeroeditor add a vehicle spawn and set it to a CP in the settings on the right side of the window
5. Add a control region and set it to a CP
6. Add the vehicle to the Vehiclespawn into the list you find on the right side of the screen if the Vehicle spawn object is selected.
Remember who is attacker and who defender. So add it to the correct slot.

7. Munge the map
8. Play

Still doesn´t work? Go back to step 2 and compare it with your own entries!

*sigh*

Posted: Mon Mar 13, 2006 2:27 pm
by Emraz
Thank you very much rends and also to anyone reading this--- I also asked a friend about this problem and this is what he came up with, I dont think he reads Gametoast :



ok, vehicles spawns work like this. I´ll explain it with the example of an AT ST because there is one additional step needed to let a walker spawn.

1.) pick the com_item_vehiclespawn.odf from your common odf folder and place it in your world.
In the Object instance window on the right hand side select the ControlZone field and enter the name of the CP where you want the AT ST to spawn at.

2.) Now have a look in your ABCg_con.lua found in data_ABC/Common/scripts/ABC.
You need to find out whether the Empire which we want to let the AT ST spawn for is attacker or defender on your map.
You find the line quite on top of the lua.
It looks like this:

-- Empire Attacking (attacker is always #1)
local ALL = 2
local IMP = 1
-- These variables do not change
local ATT = 1
local DEF = 2

These lines define IMP as attacker.

3.) Go back to zeroeditor and select your vehicle spawn.
In the popup thing on the right hand side called "object instance" you do the following thing.
You have to enter imp_walk_atst in the field ClassImpATK;
this means that an ATST is spawning for the Empire if it is the attacking team (which it is by default) and if it is in possession of the control zone (CP).
If you wanted to let an AT ST spawn for the Rebels you would have to enter imp_walk_atst in the field ClassAllDEF.

4.) Now go back to your ABCg_con.lua and add the line
"imp_walk_atst" to to your imp.lvl lines.

It should like like this:
ReadDataFile("SIDE\\imp.lvl",
"imp_inf_rifleman",
"imp_inf_rocketeer",
"imp_inf_engineer",
"imp_inf_sniper",
"imp_inf_officer",
"imp_inf_dark_trooper",
"imp_hero_bobafett",
"imp_walk_atst",
"imp_fly_destroyer_dome" )

Where it says...

-- Level Stats
ClearWalkers()
AddWalkerType(0, 0) -- special -> droidekas
AddWalkerType(1, 0) -- 1x2 (1 pair of legs)
AddWalkerType(2, 0) -- 2x2 (2 pairs of legs)
AddWalkerType(3, 0) -- 3x2 (3 pairs of legs)

... you have to change the line
AddWalkerType(1, 0) -- 1x2 (1 pair of legs)
to
AddWalkerType(1, 1) -- 1x2 (1 pair of legs)
depending on how many walkers you want to have on your map.
The first value within the brackets defines the number of leg pairs, the second value the amount of walkers of such type.
Thus the line
AddWalkerType(0, 0) -- special is for three legged droideka, the amount of them is 0 because we don´t have any droidekas in GCW.

AddWalkerType(1, 0) -- 1x2 (1 pair of legs) is for AT ST and AT RT

AddWalkerType(2, 0) -- 2x2 (2 pairs of legs) is for AT AT and Spider Droid

AddWalkerType(3, 0) -- 3x2 (3 pairs of legs) is for AT TE

Also make sure that ClearWalkers() is not commented out like this
-- ClearWalkers().
In this case you have to remove the --

So with one AT ST to spawn the whole block should look like this:

-- Level Stats
ClearWalkers()
AddWalkerType(0, 0) -- special -> droidekas
AddWalkerType(1, 1) -- 1x2 (1 pair of legs)
AddWalkerType(2, 0) -- 2x2 (2 pairs of legs)
AddWalkerType(3, 0) -- 3x2 (3 pairs of legs)

This should do it and you may save your world aswell as the lua, munge and when you run the map an AT ST should spawn at your CP for the Empire.

If you want Hover vehicles to spawn simply set a certain PoolSize for Hover in the ...

SetMemoryPoolSize("Aimer", 75)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 1024)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 32)
SetMemoryPoolSize("EntityFlyer", 32)
SetMemoryPoolSize("EntityHover", 32)
SetMemoryPoolSize("EntityLight", 200)....

.... lines in your ABCg_con.lua

For Clone wars you have to do quite the same in the ABCc_con.lua.

In case of a command vehicle like an AT AT or AT TE you have to add the line
SetMemoryPoolSize("CommandWalker", 1)

You find the correct nomenclature for the vehicles in the assets/sides/...
folders.

Hope I haven´t forgot anything.
Good luck and let me know if it worked or did not.


Now THATS a friend :-)

Also thanks again to Rends too much information doesnt exist unlessits about your gran when she was 20 or something ;-)

Posted: Mon Mar 13, 2006 3:15 pm
by Rends
Don´t forget to add the Control region or your Walker will blow up after a few seconds (like it did if you leave it anywhere on the battlefield)

Ah, i foresee the next question...

My walker has no sounds.

Muhaha, if so check the post about adding sounds i started a few days ago