Geo turret won't fire & game crash with 4 local
Posted: Sat Aug 22, 2009 7:38 am
by Executer94
The turret fires only when I shoot on it.
Here are the odfs:
tur_bldg_geoturret
tur_weap_geoturret
tur_weap_geoturret_ord
lua:
Here are the odfs:
tur_bldg_geoturret
Hidden/Spoiler:
[GameObjectClass]
ClassLabel = "armedbuilding"
GeometryName = "geo_bldg_geoturret.msh"
[Properties]
HUDTag = "hud_geo_turret"
BUILDINGSECTION = "BODY"
Label = "Geonosian Turret"
MapTexture = "turret_icon"
IconTexture = "HUD_all_lascannon_icon"
MapScale = "1.2"
HealthTexture = "HUD_geo_turret_icon"
GeometryName = "geo_bldg_geoturret"
DestroyedGeometryName = "geo_bldg_geoturret_dest"
MaxHealth = "3000.0"
BUILDINGSECTION = "TURRET1"
ForceMode = 1
PitchLimits = "-45 15"
YawLimits = "-180 180"
PitchTurnFactor = "0.0"
EyePointOffset = "0.0 2.5 0.0"
TrackCenter = "0.0 0.0 -2.0"
TrackOffset = "0.0 3.6 2.0
TurretNodeName = "aimer_y"
TiltValue = "5"
PilotPosition = "hp_active"
//PilotAnimation = "man_gun"
Pilot9Pose = "minigun_9pose"
TurretYawSound = "turret_whir_yaw_lp"
TurretYawSoundPitch = "0.7"
TurretPitchSound = "turret_whir_pitch_lp"
TurretPitchSoundPitch = "0.7"
TurretAmbientSound = ""
TurretActivateSound = "vehicle_equip"
TurretDeactivateSound = ""
TurretStartSound = ""
TurretStopSound = ""
TURRETSECTION = "TURRET1"
WeaponName = "tur_weap_geoturret"
WeaponAmmo = "0" //"2"
AimerNodeName = "aimer_x"
MaxTurnSpeed = "1.85"
MaxPitchSpeed = "0.75"
BarrelNodeName = "barrel"
BarrelLength = "1.0"
FirePointName = "hp_cannon_1"
FirstPerson = "com\comunive;com_1st_scope_universal"
DamageStartPercent = 50.0
DamageStopPercent = 30.0
DamageEffect = "com_sfx_vehiclespark"
DamageStartPercent = 30.0
DamageStopPercent = 0.0
DamageEffect = "com_sfx_smokeplume"
DamageAttachPoint = "hp_smoke_1"
ClassLabel = "armedbuilding"
GeometryName = "geo_bldg_geoturret.msh"
[Properties]
HUDTag = "hud_geo_turret"
BUILDINGSECTION = "BODY"
Label = "Geonosian Turret"
MapTexture = "turret_icon"
IconTexture = "HUD_all_lascannon_icon"
MapScale = "1.2"
HealthTexture = "HUD_geo_turret_icon"
GeometryName = "geo_bldg_geoturret"
DestroyedGeometryName = "geo_bldg_geoturret_dest"
MaxHealth = "3000.0"
BUILDINGSECTION = "TURRET1"
ForceMode = 1
PitchLimits = "-45 15"
YawLimits = "-180 180"
PitchTurnFactor = "0.0"
EyePointOffset = "0.0 2.5 0.0"
TrackCenter = "0.0 0.0 -2.0"
TrackOffset = "0.0 3.6 2.0
TurretNodeName = "aimer_y"
TiltValue = "5"
PilotPosition = "hp_active"
//PilotAnimation = "man_gun"
Pilot9Pose = "minigun_9pose"
TurretYawSound = "turret_whir_yaw_lp"
TurretYawSoundPitch = "0.7"
TurretPitchSound = "turret_whir_pitch_lp"
TurretPitchSoundPitch = "0.7"
TurretAmbientSound = ""
TurretActivateSound = "vehicle_equip"
TurretDeactivateSound = ""
TurretStartSound = ""
TurretStopSound = ""
TURRETSECTION = "TURRET1"
WeaponName = "tur_weap_geoturret"
WeaponAmmo = "0" //"2"
AimerNodeName = "aimer_x"
MaxTurnSpeed = "1.85"
MaxPitchSpeed = "0.75"
BarrelNodeName = "barrel"
BarrelLength = "1.0"
FirePointName = "hp_cannon_1"
FirstPerson = "com\comunive;com_1st_scope_universal"
DamageStartPercent = 50.0
DamageStopPercent = 30.0
DamageEffect = "com_sfx_vehiclespark"
DamageStartPercent = 30.0
DamageStopPercent = 0.0
DamageEffect = "com_sfx_smokeplume"
DamageAttachPoint = "hp_smoke_1"
Hidden/Spoiler:
[WeaponClass]
ClassLabel = "cannon"
[Properties]
SecondaryOrdnanceName = "tur_weap_geoturret_hidden"
SecondaryOrdnancePeriod = 1
Label = "LR1K Cannon"
ReticuleTexture = "reticule_rifle"
OrdnanceName = "tur_weap_geoturret_ord"
MuzzleFlash = "med_muzzle_flash"
Discharge = "med_smoke_effect"
RoundsPerClip = "0"
ShotDelay = "1.0"
ReloadTime = "2.0"
MinRange = "0"
OptimalRange = "50"
MaxRange = "60"
LockOnRange = "100.0"
LockTime = "0.0"
MinSpread = "0.0"
MaxSpread = "0.0"
//AutoAimSize = "0.1"
SalvoCount = "1"
SalvoDelay = "0.17"
InitialSalvoDelay = "0.0"
FireSound = "cis_weap_inf_sonicblaster_fire"
FireLoopSound = ""
ChargeSound = ""
ChangeModeSound = ""
WeaponChangeSound = ""
TargetEnemy = "1"
TargetNeutral = "0"
TargetFriendly = "0"
TargetPerson = "1"
TargetAnimal = "1"
TargetDroid = "1"
TargetVehicle = "1"
TargetBuilding = ""
AITargetPerson = "1"
AITargetAnimal = "1"
AITargetDroid = "1"
AITargetVehicle = "1"
AITargetBuilding = "1"
RecoilLengthLight = "0.2"
RecoilStrengthLight = "1"
RecoilLengthHeavy = "0.1"
RecoilStrengthHeavy = ".6"
ZoomMin = "2.0"
ZoomMax = "4.0"
ZoomRate = "1.0"
ScopeTexture = "weapon_scope4"
ClassLabel = "cannon"
[Properties]
SecondaryOrdnanceName = "tur_weap_geoturret_hidden"
SecondaryOrdnancePeriod = 1
Label = "LR1K Cannon"
ReticuleTexture = "reticule_rifle"
OrdnanceName = "tur_weap_geoturret_ord"
MuzzleFlash = "med_muzzle_flash"
Discharge = "med_smoke_effect"
RoundsPerClip = "0"
ShotDelay = "1.0"
ReloadTime = "2.0"
MinRange = "0"
OptimalRange = "50"
MaxRange = "60"
LockOnRange = "100.0"
LockTime = "0.0"
MinSpread = "0.0"
MaxSpread = "0.0"
//AutoAimSize = "0.1"
SalvoCount = "1"
SalvoDelay = "0.17"
InitialSalvoDelay = "0.0"
FireSound = "cis_weap_inf_sonicblaster_fire"
FireLoopSound = ""
ChargeSound = ""
ChangeModeSound = ""
WeaponChangeSound = ""
TargetEnemy = "1"
TargetNeutral = "0"
TargetFriendly = "0"
TargetPerson = "1"
TargetAnimal = "1"
TargetDroid = "1"
TargetVehicle = "1"
TargetBuilding = ""
AITargetPerson = "1"
AITargetAnimal = "1"
AITargetDroid = "1"
AITargetVehicle = "1"
AITargetBuilding = "1"
RecoilLengthLight = "0.2"
RecoilStrengthLight = "1"
RecoilLengthHeavy = "0.1"
RecoilStrengthHeavy = ".6"
ZoomMin = "2.0"
ZoomMax = "4.0"
ZoomRate = "1.0"
ScopeTexture = "weapon_scope4"
Hidden/Spoiler:
[OrdnanceClass]
ClassLabel = "fatray"
[Properties]
ExplosionName = "tur_weap_geoturret_exp"
LifeSpan = "0.45"
TurnRate = "0.0"
WaverRate = "0.0"
WaverTurn = "0.0"
Velocity = "100.0"
Gravity = "0.0"
Rebound = "0.0"
DamageDeduction = "5.0"
MaxPush = "13.0"
MinPush = "5.0"
PushDeduction = "1.0"
Pushradius = "1.0"
RayRadius = "5.0"
MaxDamage = "400.0"
VehicleScale = "0.0"
PersonScale = "1.0"
DroidScale = "1.0"
BuildingScale = "0.0"
AnimalScale = "1.0"
ShieldScale = "5.0"
TrailEffect = "geo_sfx_weap_blunderbluss_ord"
////OrdnanceSound = "com_weap_launcher_energy_dumbfire
ClassLabel = "fatray"
[Properties]
ExplosionName = "tur_weap_geoturret_exp"
LifeSpan = "0.45"
TurnRate = "0.0"
WaverRate = "0.0"
WaverTurn = "0.0"
Velocity = "100.0"
Gravity = "0.0"
Rebound = "0.0"
DamageDeduction = "5.0"
MaxPush = "13.0"
MinPush = "5.0"
PushDeduction = "1.0"
Pushradius = "1.0"
RayRadius = "5.0"
MaxDamage = "400.0"
VehicleScale = "0.0"
PersonScale = "1.0"
DroidScale = "1.0"
BuildingScale = "0.0"
AnimalScale = "1.0"
ShieldScale = "5.0"
TrailEffect = "geo_sfx_weap_blunderbluss_ord"
////OrdnanceSound = "com_weap_launcher_energy_dumbfire
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
-- load the gametype script
ScriptCB_DoFile("ObjectiveConquest")
ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("LinkedDestroyables")
-- REP Attacking (attacker is always #1)
REP = 1;
CIS = 2;
-- These variables do not change
ATT = REP;
DEF = CIS;
function ScriptPostLoad()
SetupDestroyables()
ActivateRegion("anim1")
region1 = OnEnterRegion(
function(region, player)
if IsCharacterHuman(player) then
PauseAnimation("koltotank")
RewindAnimation("koltotank")
PlayAnimation("koltotank")
end
end,
"anim1"
)
ActivateRegion("anim2")
region1 = OnEnterRegion(
function(region, player)
if IsCharacterHuman(player) then
PauseAnimation("ani")
RewindAnimation("ani")
PlayAnimation("ani")
end
end,
"anim2"
)
ActivateRegion("animdoor")
region1 = OnEnterRegion(
function(region, player)
if IsCharacterHuman(player) then
PauseAnimation("door1")
RewindAnimation("door1")
PlayAnimation("door1")
-- allow the AI to run across it
UnblockPlanningGraphArcs("connec");
DisableBarriers("doorbar");
end
end,
"animdoor"
)
ActivateRegion("anim2")
region1 = OnEnterRegion(
function(region, player)
if IsCharacterHuman(player) then
PauseAnimation("ship1")
RewindAnimation("ship1")
PlayAnimation("ship1")
end
end,
"anim2"
)
ActivateRegion("anim3")
region1 = OnEnterRegion(
function(region, player)
if IsCharacterHuman(player) then
PauseAnimation("tech1")
RewindAnimation("tech1")
PlayAnimation("tech1")
end
end,
"anim3"
)
ActivateRegion("anim3")
region1 = OnEnterRegion(
function(region, player)
if IsCharacterHuman(player) then
PauseAnimation("tech2")
RewindAnimation("tech2")
PlayAnimation("tech2")
end
end,
"anim3"
)
ActivateRegion("anim4")
region1 = OnEnterRegion(
function(region, player)
if IsCharacterHuman(player) then
PauseAnimation("unfall1")
RewindAnimation("unfall1")
PlayAnimation("unfall1")
end
end,
"anim4"
)
AddDeathRegion("deathregion")
--This defines the CPs. These need to happen first
cp1 = CommandPost:New{name = "cp1"}
cp2 = CommandPost:New{name = "cp2"}
cp3 = CommandPost:New{name = "cp3"}
cp4 = CommandPost:New{name = "cp4"}
--This sets up the actual objective. This needs to happen after cp's are defined
conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF,
textATT = "game.modes.con",
textDEF = "game.modes.con2",
multiplayerRules = true}
--This adds the CPs to the objective. This needs to happen after the objective is set up
conquest:AddCommandPost(cp1)
conquest:AddCommandPost(cp2)
conquest:AddCommandPost(cp3)
conquest:AddCommandPost(cp4)
conquest:Start()
Setubermode(1);
EnableSPHeroRules()
AddDeathRegion("1")
end
---------------------------------------------------------------------------
-- FUNCTION: ScriptInit
-- PURPOSE: This function is only run once
-- INPUT:
-- OUTPUT:
-- NOTES: The name, 'ScriptInit' is a chosen convention, and each
-- mission script must contain a version of this function, as
-- it is called from C to start the mission.
---------------------------------------------------------------------------
function ScriptInit()
ReadDataFile("ingame.lvl")
SetMaxFlyHeight(800)
SetMaxPlayerFlyHeight (800)
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
SetMemoryPoolSize("Music", 40)
ReadDataFile("sound\\geo.lvl;geo1cw")
ReadDataFile("dc:SIDE\\rep.lvl",
"rep_inf_ep2_rifleman",
"rep_inf_ep2_rocketeer",
"rep_inf_ep2_engineer",
"rep_inf_ep2_sniper",
"rep_inf_ep2_rocketeer_chaingun",
"rep_fly_gunship_DOME",
"rep_inf_captain_rex",
"rep_hover_fightertank",
"rep_inf_ep2_rocketeer_chaingun",
"rep_fly_gunship",
"rep_hover_barcspeeder")
ReadDataFile("dc:SIDE\\cis.lvl",
"cis_inf_rifleman",
"cis_inf_rocketeer",
"cis_inf_engineer",
"cis_inf_sniper",
"cis_inf_marine",
"cis_inf_droideka",
"cis_hover_aat")
ReadDataFile("dc:SIDE\\shu.lvl",
"rep_fly_command")
ReadDataFile("dc:SIDE\\cis.lvl",
"cis_walk_spiderkas")
ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_geoturret")
ReadDataFile("dc:SIDE\\geo.lvl",
"gen_inf_geonosian")
ReadDataFile("dc:SIDE\\bf1.lvl",
"bf1_inf_geonosian")
ReadDataFile("dc:SIDE\\dwa.lvl",
"cis_walk_dwarfspider")
ReadDataFile("dc:SIDE\\shu.lvl",
"rep_fly_command")
SetupTeams{
rep = {
team = REP,
units = 0,
reinforcements = -1,
assault = { "rep_inf_ep2_rocketeer",1, 1},
special = { "rep_inf_captain_rex",1, 1},
},
cis = {
team = CIS,
units = 50,
reinforcements = -1,
engineer = { "cis_inf_sniper",1, 4},
soldier = { "cis_inf_rifleman",1, 4},
sniper = { "cis_inf_marine",1, 4},
special = { "cis_inf_droideka",1, 4},
}
}
SetTeamName (3, "Geos")
AddUnitClass (3, "geo_inf_geonosian", 15 ,55)
AddUnitClass (3, "bf1_inf_geonosian", 15 ,55)
SetUnitCount (3, 15)
AddAIGoal(3, "Deathmatch", 500)
SetReinforcementCount(3, -1)
SetTeamAsEnemy(ATT,3)
SetTeamAsEnemy(3,ATT)
SetTeamAsFriend(DEF,3)
SetTeamAsFriend(3,DEF)
SetTeamName (4, "reps")
AddUnitClass (4, "rep_inf_ep2_rifleman", 15 ,55)
AddUnitClass (4, "rep_inf_ep2_sniper", 15 ,55)
SetUnitCount (4, 15)
AddAIGoal(4, "Deathmatch", 500)
SetReinforcementCount(4, -1)
SetTeamAsEnemy(DEF,4)
SetTeamAsEnemy(4,DEF)
SetTeamAsFriend(ATT,4)
SetTeamAsFriend(4,ATT)
SetHeroClass(REP, "rep_hero_anakin")
AddDeathRegion("deathregion")
-- Level Stats
-- ClearWalkers()
AddWalkerType(0,
-- special -> droidekas
AddWalkerType(1, 2) -- 1x2 (1 pair of legs)
AddWalkerType(2, 2) -- 2x2 (2 pairs of legs)
AddWalkerType(3, 2) -- 3x2 (3 pairs of legs)
local weaponCnt = 1024
SetMemoryPoolSize("Aimer", 75)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 1024)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("CommandFlyer", 2)
SetMemoryPoolSize("EntityCloth", 32)
SetMemoryPoolSize("CommandFlyer", 2)
SetMemoryPoolSize("EntityWalker", 32)
SetMemoryPoolSize("EntityFlyer", 32)
SetMemoryPoolSize("EntityHover", 32)
SetMemoryPoolSize("EntityLight", 200)
SetMemoryPoolSize("EntitySoundStream", 4)
SetMemoryPoolSize("EntitySoundStatic", 32)
SetMemoryPoolSize("MountedTurret", 32)
SetMemoryPoolSize("Navigator", 128)
SetMemoryPoolSize("Obstacle", 1024)
SetMemoryPoolSize("PathNode", 1024)
SetMemoryPoolSize("SoundSpaceRegion", 64)
SetMemoryPoolSize("TreeGridStack", 1024)
SetMemoryPoolSize("UnitAgent", 128)
SetMemoryPoolSize("UnitController", 128)
SetMemoryPoolSize("Weapon", weaponCnt)
SetSpawnDelay(10.0, 0.25)
--ReadDataFile("dc:MID\\MID.lvl", "MID_conquest")
ReadDataFile("dc:MID\\MID.lvl", "MID_conquest")
SetDenseEnvironment("false")
AddDeathRegion("deathregion")
-- Sound
SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
voiceSlow = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)
voiceQuick = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_quick")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_quick", voiceQuick)
OpenAudioStream("sound\\global.lvl", "cw_music")
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
OpenAudioStream("sound\\geo.lvl", "geo1cw")
OpenAudioStream("sound\\geo.lvl", "geo1cw")
OpenAudioStream("sound\\yav.lvl", "geo1_emt")
SetBleedingVoiceOver(REP, REP, "rep_off_com_report_us_overwhelmed", 1)
SetBleedingVoiceOver(REP, CIS, "rep_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(CIS, REP, "cis_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(CIS, CIS, "cis_off_com_report_us_overwhelmed", 1)
SetOutOfBoundsVoiceOver(2, "cisleaving")
SetOutOfBoundsVoiceOver(1, "repleaving")
SetAmbientMusic(REP, 1.0, "rep_GEO_amb_end", 0,1)
SetAmbientMusic(REP, 0.8, "rep_GEO_amb_middle", 1,1)
SetAmbientMusic(REP, 0.2, "rep_GEO_amb_start", 2,1)
SetAmbientMusic(CIS, 1.0, "cis_yav_amb_start", 0,1)
SetAmbientMusic(CIS, 0.8, "cis_yav_amb_middle", 1,1)
SetAmbientMusic(CIS, 0.2, "cis_yav_amb_end", 2,1)
SetVictoryMusic(REP, "rep_geo_amb_victory")
SetDefeatMusic (REP, "rep_geo_amb_defeat")
SetVictoryMusic(CIS, "cis_yav_amb_victory")
SetDefeatMusic (CIS, "cis_yav_amb_defeat")
SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
--SetSoundEffect("BirdScatter", "birdsFlySeq1")
--SetSoundEffect("WeaponUnableSelect", "com_weap_inf_weaponchange_null")
--SetSoundEffect("WeaponModeUnableSelect", "com_weap_inf_modechange_null")
SetSoundEffect("SpawnDisplayUnitChange", "shell_select_unit")
SetSoundEffect("SpawnDisplayUnitAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplaySpawnPointChange", "shell_select_change")
SetSoundEffect("SpawnDisplaySpawnPointAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplayBack", "shell_menu_exit")
--OpeningSateliteShot
AddCameraShot(5.908386, 5.209095, 5.352873, -5.081226, -45.922508, -19.114113, 77.022636);
--Opening Satalite Shot
--Geo
--Mountain
AddCameraShot(8.996091, 20.085528, 20.022005, 14.001889, 6.942698, 59.197201, 26.136919)
--Wrecked Ship
AddCameraShot(2.906778, 7.081875, 5.411906, 9.037192, 26.373968, 59.937874, 122.553581)
--War Room
--AddCameraShot(5.994219, 6.074374, 8.077228, 8.005777, 90.939568, 49.293945, 69.571136)
end
AddDeathRegion("deathregion")
function SetupDestroyables()
--CIS destroyables
lifeSupportLinkageCIS = LinkedDestroyables:New{ objectSets = {{"door"}, {"geofighter1"}, {"bar"}} }
lifeSupportLinkageCIS:Init()
engineLinkageCIS = LinkedDestroyables:New{ objectSets = {{"gen1", "gen2"}, {"shield1"}} }
engineLinkageCIS:Init()
end
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
-- load the gametype script
ScriptCB_DoFile("ObjectiveConquest")
ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("LinkedDestroyables")
-- REP Attacking (attacker is always #1)
REP = 1;
CIS = 2;
-- These variables do not change
ATT = REP;
DEF = CIS;
function ScriptPostLoad()
SetupDestroyables()
ActivateRegion("anim1")
region1 = OnEnterRegion(
function(region, player)
if IsCharacterHuman(player) then
PauseAnimation("koltotank")
RewindAnimation("koltotank")
PlayAnimation("koltotank")
end
end,
"anim1"
)
ActivateRegion("anim2")
region1 = OnEnterRegion(
function(region, player)
if IsCharacterHuman(player) then
PauseAnimation("ani")
RewindAnimation("ani")
PlayAnimation("ani")
end
end,
"anim2"
)
ActivateRegion("animdoor")
region1 = OnEnterRegion(
function(region, player)
if IsCharacterHuman(player) then
PauseAnimation("door1")
RewindAnimation("door1")
PlayAnimation("door1")
-- allow the AI to run across it
UnblockPlanningGraphArcs("connec");
DisableBarriers("doorbar");
end
end,
"animdoor"
)
ActivateRegion("anim2")
region1 = OnEnterRegion(
function(region, player)
if IsCharacterHuman(player) then
PauseAnimation("ship1")
RewindAnimation("ship1")
PlayAnimation("ship1")
end
end,
"anim2"
)
ActivateRegion("anim3")
region1 = OnEnterRegion(
function(region, player)
if IsCharacterHuman(player) then
PauseAnimation("tech1")
RewindAnimation("tech1")
PlayAnimation("tech1")
end
end,
"anim3"
)
ActivateRegion("anim3")
region1 = OnEnterRegion(
function(region, player)
if IsCharacterHuman(player) then
PauseAnimation("tech2")
RewindAnimation("tech2")
PlayAnimation("tech2")
end
end,
"anim3"
)
ActivateRegion("anim4")
region1 = OnEnterRegion(
function(region, player)
if IsCharacterHuman(player) then
PauseAnimation("unfall1")
RewindAnimation("unfall1")
PlayAnimation("unfall1")
end
end,
"anim4"
)
AddDeathRegion("deathregion")
--This defines the CPs. These need to happen first
cp1 = CommandPost:New{name = "cp1"}
cp2 = CommandPost:New{name = "cp2"}
cp3 = CommandPost:New{name = "cp3"}
cp4 = CommandPost:New{name = "cp4"}
--This sets up the actual objective. This needs to happen after cp's are defined
conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF,
textATT = "game.modes.con",
textDEF = "game.modes.con2",
multiplayerRules = true}
--This adds the CPs to the objective. This needs to happen after the objective is set up
conquest:AddCommandPost(cp1)
conquest:AddCommandPost(cp2)
conquest:AddCommandPost(cp3)
conquest:AddCommandPost(cp4)
conquest:Start()
Setubermode(1);
EnableSPHeroRules()
AddDeathRegion("1")
end
---------------------------------------------------------------------------
-- FUNCTION: ScriptInit
-- PURPOSE: This function is only run once
-- INPUT:
-- OUTPUT:
-- NOTES: The name, 'ScriptInit' is a chosen convention, and each
-- mission script must contain a version of this function, as
-- it is called from C to start the mission.
---------------------------------------------------------------------------
function ScriptInit()
ReadDataFile("ingame.lvl")
SetMaxFlyHeight(800)
SetMaxPlayerFlyHeight (800)
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
SetMemoryPoolSize("Music", 40)
ReadDataFile("sound\\geo.lvl;geo1cw")
ReadDataFile("dc:SIDE\\rep.lvl",
"rep_inf_ep2_rifleman",
"rep_inf_ep2_rocketeer",
"rep_inf_ep2_engineer",
"rep_inf_ep2_sniper",
"rep_inf_ep2_rocketeer_chaingun",
"rep_fly_gunship_DOME",
"rep_inf_captain_rex",
"rep_hover_fightertank",
"rep_inf_ep2_rocketeer_chaingun",
"rep_fly_gunship",
"rep_hover_barcspeeder")
ReadDataFile("dc:SIDE\\cis.lvl",
"cis_inf_rifleman",
"cis_inf_rocketeer",
"cis_inf_engineer",
"cis_inf_sniper",
"cis_inf_marine",
"cis_inf_droideka",
"cis_hover_aat")
ReadDataFile("dc:SIDE\\shu.lvl",
"rep_fly_command")
ReadDataFile("dc:SIDE\\cis.lvl",
"cis_walk_spiderkas")
ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_geoturret")
ReadDataFile("dc:SIDE\\geo.lvl",
"gen_inf_geonosian")
ReadDataFile("dc:SIDE\\bf1.lvl",
"bf1_inf_geonosian")
ReadDataFile("dc:SIDE\\dwa.lvl",
"cis_walk_dwarfspider")
ReadDataFile("dc:SIDE\\shu.lvl",
"rep_fly_command")
SetupTeams{
rep = {
team = REP,
units = 0,
reinforcements = -1,
assault = { "rep_inf_ep2_rocketeer",1, 1},
special = { "rep_inf_captain_rex",1, 1},
},
cis = {
team = CIS,
units = 50,
reinforcements = -1,
engineer = { "cis_inf_sniper",1, 4},
soldier = { "cis_inf_rifleman",1, 4},
sniper = { "cis_inf_marine",1, 4},
special = { "cis_inf_droideka",1, 4},
}
}
SetTeamName (3, "Geos")
AddUnitClass (3, "geo_inf_geonosian", 15 ,55)
AddUnitClass (3, "bf1_inf_geonosian", 15 ,55)
SetUnitCount (3, 15)
AddAIGoal(3, "Deathmatch", 500)
SetReinforcementCount(3, -1)
SetTeamAsEnemy(ATT,3)
SetTeamAsEnemy(3,ATT)
SetTeamAsFriend(DEF,3)
SetTeamAsFriend(3,DEF)
SetTeamName (4, "reps")
AddUnitClass (4, "rep_inf_ep2_rifleman", 15 ,55)
AddUnitClass (4, "rep_inf_ep2_sniper", 15 ,55)
SetUnitCount (4, 15)
AddAIGoal(4, "Deathmatch", 500)
SetReinforcementCount(4, -1)
SetTeamAsEnemy(DEF,4)
SetTeamAsEnemy(4,DEF)
SetTeamAsFriend(ATT,4)
SetTeamAsFriend(4,ATT)
SetHeroClass(REP, "rep_hero_anakin")
AddDeathRegion("deathregion")
-- Level Stats
-- ClearWalkers()
AddWalkerType(0,
AddWalkerType(1, 2) -- 1x2 (1 pair of legs)
AddWalkerType(2, 2) -- 2x2 (2 pairs of legs)
AddWalkerType(3, 2) -- 3x2 (3 pairs of legs)
local weaponCnt = 1024
SetMemoryPoolSize("Aimer", 75)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 1024)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("CommandFlyer", 2)
SetMemoryPoolSize("EntityCloth", 32)
SetMemoryPoolSize("CommandFlyer", 2)
SetMemoryPoolSize("EntityWalker", 32)
SetMemoryPoolSize("EntityFlyer", 32)
SetMemoryPoolSize("EntityHover", 32)
SetMemoryPoolSize("EntityLight", 200)
SetMemoryPoolSize("EntitySoundStream", 4)
SetMemoryPoolSize("EntitySoundStatic", 32)
SetMemoryPoolSize("MountedTurret", 32)
SetMemoryPoolSize("Navigator", 128)
SetMemoryPoolSize("Obstacle", 1024)
SetMemoryPoolSize("PathNode", 1024)
SetMemoryPoolSize("SoundSpaceRegion", 64)
SetMemoryPoolSize("TreeGridStack", 1024)
SetMemoryPoolSize("UnitAgent", 128)
SetMemoryPoolSize("UnitController", 128)
SetMemoryPoolSize("Weapon", weaponCnt)
SetSpawnDelay(10.0, 0.25)
--ReadDataFile("dc:MID\\MID.lvl", "MID_conquest")
ReadDataFile("dc:MID\\MID.lvl", "MID_conquest")
SetDenseEnvironment("false")
AddDeathRegion("deathregion")
-- Sound
SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
voiceSlow = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)
voiceQuick = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_quick")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_quick", voiceQuick)
OpenAudioStream("sound\\global.lvl", "cw_music")
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
OpenAudioStream("sound\\geo.lvl", "geo1cw")
OpenAudioStream("sound\\geo.lvl", "geo1cw")
OpenAudioStream("sound\\yav.lvl", "geo1_emt")
SetBleedingVoiceOver(REP, REP, "rep_off_com_report_us_overwhelmed", 1)
SetBleedingVoiceOver(REP, CIS, "rep_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(CIS, REP, "cis_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(CIS, CIS, "cis_off_com_report_us_overwhelmed", 1)
SetOutOfBoundsVoiceOver(2, "cisleaving")
SetOutOfBoundsVoiceOver(1, "repleaving")
SetAmbientMusic(REP, 1.0, "rep_GEO_amb_end", 0,1)
SetAmbientMusic(REP, 0.8, "rep_GEO_amb_middle", 1,1)
SetAmbientMusic(REP, 0.2, "rep_GEO_amb_start", 2,1)
SetAmbientMusic(CIS, 1.0, "cis_yav_amb_start", 0,1)
SetAmbientMusic(CIS, 0.8, "cis_yav_amb_middle", 1,1)
SetAmbientMusic(CIS, 0.2, "cis_yav_amb_end", 2,1)
SetVictoryMusic(REP, "rep_geo_amb_victory")
SetDefeatMusic (REP, "rep_geo_amb_defeat")
SetVictoryMusic(CIS, "cis_yav_amb_victory")
SetDefeatMusic (CIS, "cis_yav_amb_defeat")
SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
--SetSoundEffect("BirdScatter", "birdsFlySeq1")
--SetSoundEffect("WeaponUnableSelect", "com_weap_inf_weaponchange_null")
--SetSoundEffect("WeaponModeUnableSelect", "com_weap_inf_modechange_null")
SetSoundEffect("SpawnDisplayUnitChange", "shell_select_unit")
SetSoundEffect("SpawnDisplayUnitAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplaySpawnPointChange", "shell_select_change")
SetSoundEffect("SpawnDisplaySpawnPointAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplayBack", "shell_menu_exit")
--OpeningSateliteShot
AddCameraShot(5.908386, 5.209095, 5.352873, -5.081226, -45.922508, -19.114113, 77.022636);
--Opening Satalite Shot
--Geo
--Mountain
AddCameraShot(8.996091, 20.085528, 20.022005, 14.001889, 6.942698, 59.197201, 26.136919)
--Wrecked Ship
AddCameraShot(2.906778, 7.081875, 5.411906, 9.037192, 26.373968, 59.937874, 122.553581)
--War Room
--AddCameraShot(5.994219, 6.074374, 8.077228, 8.005777, 90.939568, 49.293945, 69.571136)
end
AddDeathRegion("deathregion")
function SetupDestroyables()
--CIS destroyables
lifeSupportLinkageCIS = LinkedDestroyables:New{ objectSets = {{"door"}, {"geofighter1"}, {"bar"}} }
lifeSupportLinkageCIS:Init()
engineLinkageCIS = LinkedDestroyables:New{ objectSets = {{"gen1", "gen2"}, {"shield1"}} }
engineLinkageCIS:Init()
end