Respawning self-piloted vehicles

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
User avatar
Eggman
Master Bounty Hunter
Master Bounty Hunter
Posts: 1516
Joined: Mon Jul 16, 2007 1:30 pm
Projects :: Battlefront Chronicles
Location: Las Vegas

Respawning self-piloted vehicles

Post by Eggman »

I have some self-piloted flyers placed in a map as objects (not using vehicle spawns for various reasons) and I would like them to respawn upon their death as flyers ordinarily do when using vehicle spawn points. I'm pretty sure it should be possible, but I haven't been able to do it yet. Here's the section of the .odf I'm looking at:
Hidden/Spoiler:
[GameObjectClass]
ClassLabel = "flyer"
GeometryName = "cis_fly_droidfighter.msh"
VehicleType = "fighter"

[Properties]
LODPriorityMod = "2.5"

FLYERSECTION = "BODY"
Label = "Droid Starfighter"
MapTexture = "droidfighter_icon"
MapScale = "1.5"
PilotType = self
HUDModel = "hud_DroidStarfighter_vulture_shape"
HealthTexture = "HUD_cis_droidfighter_icon"

MapScale = 1.5
MapViewMin = 750
MapViewMax = 750


VehiclePosition = "common.vehiclepositions.pilot"

GeometryName = "cis_fly_droidfighter"
AnimationName = "cis_fly_droidfighter"
//FirstPerson = "cis\cisstrft;cis_1st_cockpit_starfighter"

//ForceMode = "1"
CollisionScale = "1.5"
CollisionThreshold = "5"

MaxHealth = "2250"
HealthType = "vehicle"
RespawnTime = "1"
Now, the section in red should control how soon after its death the object should respawn, correct? I took the line from one of the auto-turret types from the shipped space maps that respawn a minute or two after they have been destroyed and just edited the time value. I assumed that it would work with the flyer class also, but so far I haven't seen any results. Can anyone help?
Grev
Hoth Battle Chief
Hoth Battle Chief
Posts: 3132
Joined: Sun Dec 09, 2007 11:45 pm
Projects :: No Mod project currently.
Games I'm Playing :: Minecraft
Location: A Certain Box Canyon

Re: Respawning self-piloted vehicles

Post by Grev »

Why wouldnt you use vehicle spawns? Use them, and then set the type of ship you want to be auto piloted, and theres a code to make it self piloted. Look in the Clone Remnant: Rise thread the before last page, one of Calebs posts for the exact script for it.
Aman/Pinguin
Jedi
Jedi
Posts: 1104
Joined: Tue Jan 30, 2007 6:04 am
Projects :: Inactive
Location: Germany

Re: Respawning self-piloted vehicles

Post by Aman/Pinguin »

Eggman wrote:
Hidden/Spoiler:
[GameObjectClass]
ClassLabel = "flyer"
GeometryName = "cis_fly_droidfighter.msh"
VehicleType = "fighter"

[Properties]
LODPriorityMod = "2.5"

FLYERSECTION = "BODY"
Label = "Droid Starfighter"
MapTexture = "droidfighter_icon"
MapScale = "1.5"
PilotType = self
HUDModel = "hud_DroidStarfighter_vulture_shape"
HealthTexture = "HUD_cis_droidfighter_icon"

MapScale = 1.5
MapViewMin = 750
MapViewMax = 750


VehiclePosition = "common.vehiclepositions.pilot"

GeometryName = "cis_fly_droidfighter"
AnimationName = "cis_fly_droidfighter"
//FirstPerson = "cis\cisstrft;cis_1st_cockpit_starfighter"

//ForceMode = "1"
CollisionScale = "1.5"
CollisionThreshold = "5"

MaxHealth = "2250"
HealthType = "vehicle"
RespawnTime = "1"
He has that code already in his ODF.
Long time since I worked with RespawnTime, but I remember something that the Respawn time has to be very high. (Don't ask me why.) Maybe I'm wrong but you could at least try it.

Anyway, why don't you want to use vehiclespawns?
User avatar
Eggman
Master Bounty Hunter
Master Bounty Hunter
Posts: 1516
Joined: Mon Jul 16, 2007 1:30 pm
Projects :: Battlefront Chronicles
Location: Las Vegas

Re: Respawning self-piloted vehicles

Post by Eggman »

I wasn't using spawn points because for my purposes it was just more efficient to place the vehicles as objects in Zeroeditor. In the time I was waiting for an answer though I decided to just use spawn points for the time being and they work well enough that I can let the question go. Still, if anyone does know if what I was asking is possible, it might be nice to have the knowledge just for future reference.
Post Reply