Exit the Armed Building

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
jangoisbaddest
Lieutenant General
Lieutenant General
Posts: 661
Joined: Mon Feb 27, 2006 12:10 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: All Along The Watchtower

Exit the Armed Building

Post by jangoisbaddest »

I was hoping that someone could tell me if there was a LUA function that forces people out of an armed building with positions. Because when I destroy it, the map crashes, and I'm pretty sure it's because I have AI in there and I placed it in Zero Editor (and therefore is not treated like an ordinary vehicle - also it is, by definition, a building, not a vehicle). So anyway, I'm trying to make it so that the people inside are either killed or ejected before I destroy the thing. Possible?

Maybe I'm going about this the wrong way. I mean, I want them to be one-time vehicles, but there must be some way of making it behave like a destroyed vehicle when it is brought down(mainly killing everyone inside).
FragMe!
Gametoast Staff
Gametoast Staff
Posts: 2244
Joined: Sat May 13, 2006 12:34 am
Projects :: Not sure keep changing my mind.
Games I'm Playing :: F1 and SWBF
xbox live or psn: No gamertag set
Location: Origin name GT_FragMe
Contact:

Re: Exit the Armed Building

Post by FragMe! »

What explosion effect are you using? If the game can't find it it will CTD.
Try commenting out the explosion effect in the ODF and see if that makes a difference
User avatar
jangoisbaddest
Lieutenant General
Lieutenant General
Posts: 661
Joined: Mon Feb 27, 2006 12:10 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: All Along The Watchtower

Re: Exit the Armed Building

Post by jangoisbaddest »

FragMe! wrote:What explosion effect are you using? If the game can't find it it will CTD.
Try commenting out the explosion effect in the ODF and see if that makes a difference
Actually, it didn't have an explosion. So I made one, refrenced it, and tried again. It exploded fine (I saw the effect happen), and then it crashed. Before the effect was finished, but I saw it start. I'm not sure I know what that means. :P

Here's the odf for the armed building:
Hidden/Spoiler:
[GameObjectClass]
ClassLabel = "armedbuilding"
GeometryName = "rep_prop_juggernaut.msh"
GeometryScale = .5

[Properties]

BUILDINGSECTION = "BODY"

MapScale = ".5"

GeometryName = "rep_prop_juggernaut"
ExplosionName = "rep_prop_juggernaut_exp"

BUILDINGSECTION = "TURRET1"

PitchLimits = "-12.5 10.0"
YawLimits = "-45 45"
PCPitchRate = 15.0
PCTurnRate = 20.0

EyePointOffset = "5.0 5.3 5.25"
TrackOffset = "5.0 5.0 5.0"
TrackCenter = "5.0 5.2 5.0"
TiltValue = "5.0"

TurnRate = 1.5
TurnFilter = 10.0
PitchRate = 0.5
PitchFilter = 10.0
PitchDamp = 1.0
PitchBuildupMultiplier = 0.5
TurnBuildupMultiplier = 0.5

VehiclePosition = "common.vehicleposition.copilot"

WeaponName = "rep_weap_prop_juggernaut_turret"
WeaponAmmo = "0"


AimerNodeName = "aimer_turretL"
AimerPitchLimits = "-50 30"
AimerYawLimits = "-50.0 50.0"

BarrelNodeName = "barrel_l1"
BarrelRecoil = "0.25"
FirePointName = "hp_fire_l1"

NextBarrel = "-"

BarrelNodeName = "barrel_l2"
BarrelRecoil = "0.25"
FirePointName = "hp_fire_l2"

NextAimer = "-"

AimerNodeName = "aimer_turretR"
AimerPitchLimits = "-50 30"
AimerYawLimits = "-50.0 50.0"

BarrelNodeName = "barrel_r1"
BarrelRecoil = "0.25"
FirePointName = "hp_fire_r1"

NextBarrel = "-"

BarrelNodeName = "barrel_r2"
BarrelRecoil = "0.25"
FirePointName = "hp_fire_r2"





BUILDINGSECTION = "TURRET2"


WEAPONSECTION = "1"
WeaponName = "rep_weap_prop_jug_laser"
WeaponAmmo = "0"

TurretNodeName = "turret_rear"

EyePointOffset = "5.0 5.3 5.25"
TrackOffset = "5.0 5.0 5.0"
TrackCenter = "5.0 5.2 5.0"
TiltValue = "5.0"
PitchTurnFactor = "0.0"

AimerNodeName = "hp_rear"
AimerPitchLimits = "0 75"
AimerYawLimits = "0 0"

FirstPersonFOV = "52"

ThirdPersonFOV = "52"


FirePointName = "hp_rear_fire"
PitchLimits = "-30 20"
YawLimits = "-180 180"

PitchRate = "0.75"
//PitchFilter = "3.75"
TurnRate = "1.25"
//TurnFilter = "3.75"

BarrelLength = "1.0"
//PilotPosition = "hp_gunner_rear"


//BUILDINGSECTION = "TURRET3"

//TurretNodeName = "turret22"

//PitchRate = 0.8
//PitchFilter = 2.75
//TurnRate = 1.3
//TurnFilter = 2.75


//PitchLimits = "-180 180"
//YawLimits = "-180 180"
//EyePointOffset = "0.0 0.0 0.0"
//TrackCenter = "0.0 0.0 0.0"
//TrackOffset = "0.0 10.0 -4.0"
//TiltValue = "0.0"

//WEAPONSECTION = "1"
//WeaponName = "rep_weap_porp_jug_laser"
//WeaponAmmo = "8"

//AimerNodeName = "hp_lgun3"
//AimerYawLimits = "-0.0 0.0"
//AimerPitchLimits = "-0.0 0.0"
//FirePointName = "hp_lgun3"
//BarrelLength = "1.0"
//PilotPosition = "hp_gunner_top"

//WEAPONSECTION = "2"

//WeaponName = "rep_weap_prop_jug_laser"
//WeaponAmmo = "8"



//BUILDINGSECTION = "TURRET4"

//WEAPONSECTION = "1"
//WeaponName = "rep_weap_prop_jug_laser"
//WeaponAmmo = "8"

//AimerNodeName = "hp_gun_top"
//AimerYawLimits = "-0.0 0.0"
//AimerPitchLimits = "-0.0 0.0"


FoleyFXGroup = "metal_foley"
And here is the code that calls the KillObject functions in the conquest LUA:
Hidden/Spoiler:
OnFinishCaptureName(
function(post)
if GetCommandPostTeam(post) == 2 then
KillObject("jug1")
DisableBarriers("jug1")
end
end,
"cp4"
)

OnFinishCaptureName(
function(post)
if GetCommandPostName(post) == 2 then
KillObject("jug1")
DisableBarriers("jug1")
end
end,
"cp5"
)
ETA: There were no meaningful errors in the error log. And even if there were, I don't have enough room to post it here. It's rather filled with a lot of localization warnings and such :P.
Post Reply