Page 1 of 1

Problem w/ campaign

Posted: Tue Jan 05, 2010 5:55 pm
by (Anonymous)
I'm having trouble with my campaign (no surprise :wink:.) The map loads I automatically become empire, so far so good, I spawn there are no AI and my single objective to move to the middle of the map doesn't run. Here's my log and lua:

LUA (the setup times is below and unedited, the ambush is for later):
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("ObjectiveConquest")
ScriptCB_DoFile("MultiObjectiveContainer")-- I'm not sure what this is for, but it is included in Almost all the Campaign missions
ScriptCB_DoFile("ObjectiveGoto")-- well this speaks for it'selve
ScriptCB_SetGameRules("campaign")
ScriptCB_DoFile("Ambush")-- Jawa's will be ambushing us at the ruble, so we need this

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

function ScriptPostLoad()


ScriptCB_SetGameRules("campaign")-- Here you can see a script being used; The script to define the gameRules(of wich I don't really know what they do EXACTLY)
SetAIDifficulty(0, 0, "medium")-- I'd say this influences the dumbness of the A.I. to compensate for difficult maps.
DisableAIAutoBalance()--Help requested on explaining this



function ScriptPostLoad()


--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
onfirstspawn = OnCharacterSpawn(
function(character)
if IsCharacterHuman(character) then
ReleaseCharacterSpawn(onfirstspawn)
onfirstspawn = nil
objectives_timer = CreateTimer("objectives_timer")
SetTimerValue(objectives_timer, 2)
StartTimer(objectives_timer)
begin_objectives = OnTimerElapse(
function(timer)
StartObjectives ()
ScriptCB_EnableCommandPostVO(0)
end,
objectives_timer
)
end
end
)

--objective 1; Go to the pile of ruble
Objective1 = ObjectiveGoto:New{TeamATT = ATT, --Make a new objective for the attacking team.
text = "level.@#$.objectives.empire.1", popupText = "level.@#$.objectives.empire.1_popup",
--above we tell the game to show the objective we typed in the localisation tool, near the map and in the upperscreen.
regionName = "goto1", mapIcon = "hud_objective_icon_circle", AIGoalWeight = 0}
-- we just told the game to wich region(wich we placed and named in zeroeditor we want the player to go and that the game should indicate this place on the map with a yellow marker. The A.I. Will have no interest in going here(AIGoalWeight = 0)
Objective1.OnStart = function(self)
att_obj1_aigoal = AddAIGoal(ATT, "Deathmatch", 100)
MapAddEntityMarker("goto", "hud_objective_icon", 3.0, 1, "YELLOW", true)
-- here we told the A.I. what to do.
end

Objective1.OnComplete = function(self)
DeleteAIGoal(att_obj1_aigoal)
ShowMessageText("game.objectives.complete")
ShowPopup("level.@#$.objectives.empire.1complete_popup", ATT)
--when the objective is completed, we don't need the A.I. goal anymore, and we want to inform the player that the objective is completed by showing this in the top of the screen and with a popup.
MapRemoveEntityMarker("goto")
-- we don't need that marker anymore so we delete that.
end
--

conquest = ObjectiveConquest:New{teamDEF = DEF,
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()

EnableSPHeroRules()

end
function StartObjectives()
objectiveSequence = MultiObjectiveContainer:New{delayVictoryTime = 4.0 }
objectiveSequence:AddObjectiveSet(Objective1)
objectiveSequence:Start()
end

conquest:Start()

EnableSPHeroRules()

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.
---------------------------------------------------------------------------
Log (green is....I don't know, look at it, it may save you some trouble):
Hidden/Spoiler:
Message Severity: 2
.\Source\HUDElementBitmap.cpp(380)
HUD BitmapElement unable to find texture btn_directional_pad_LR
game_interface: Entered
utility_functions2: Listening on AddUnitClass() calls
utility_functions2: Listening on SetHeroClass() calls
utility_functions2: Listening on ReadDataFile() calls
game_interface: Reading in custom strings
game_interface: No user_script_0.lvl
game_interface: No user_script_1.lvl
game_interface: No user_script_2.lvl
game_interface: No user_script_3.lvl
game_interface: No user_script_4.lvl
game_interface: No user_script_5.lvl
game_interface: No user_script_6.lvl
game_interface: No user_script_7.lvl
game_interface: No user_script_8.lvl
game_interface: No user_script_9.lvl
game_interface: No user_script_10.lvl
ifs_sideselect_fnBuildScreen()
game_interface: Exited

Message Severity: 2
.\Memory\RedMemoryPool.cpp(317)
Memory pool "ClothData" set item count after being allocated

Message Severity: 2
.\Source\VOHelper.cpp(196)
unknown VO type: SpottedVO


Message Severity: 2
.\Source\VOHelper.cpp(196)
unknown VO type: NeedRepairVO


Message Severity: 2
.\Source\VOHelper.cpp(196)
unknown VO type: NeedPickupVO


Message Severity: 2
.\Source\VOHelper.cpp(196)
unknown VO type: NeedBackupVO


Message Severity: 2
.\Source\VOHelper.cpp(196)
unknown VO type: DefendPositionVO


Message Severity: 2
.\Source\VOHelper.cpp(183)
VOSound (han_hero_pc_com_hostile_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
.\Source\VOHelper.cpp(196)
unknown VO type: SpottedVO


Message Severity: 2
.\Source\VOHelper.cpp(183)
VOSound (han_hero_pc_com_mechanic_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
.\Source\VOHelper.cpp(196)
unknown VO type: NeedRepairVO


Message Severity: 2
.\Source\VOHelper.cpp(183)
VOSound (han_hero_pc_com_transport_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
.\Source\VOHelper.cpp(196)
unknown VO type: NeedPickupVO


Message Severity: 2
.\Source\VOHelper.cpp(183)
VOSound (han_hero_pc_com_backup_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
.\Source\VOHelper.cpp(196)
unknown VO type: NeedBackupVO


Message Severity: 2
.\Source\VOHelper.cpp(196)
unknown VO type: InVehicle


Message Severity: 2
.\Source\VOHelper.cpp(183)
VOSound (han_hero_pc_com_defend_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
.\Source\VOHelper.cpp(196)
unknown VO type: DefendPositionVO


Message Severity: 2
.\Graphics\Pc\pcRedTexture.cpp(553)
Texture 'a295' [2dbb7264] uses 1.33 MB

Message Severity: 2
.\Graphics\Pc\pcRedTexture.cpp(553)
Texture 'a295' [2dbb7264] uses 1.33 MB

Message Severity: 2
.\Source\EntityGeometry.cpp(1058)
Entity "com_weap_veh_guided_rocket_ord" unknown terrain collision "p_front_sphere"

Message Severity: 2
.\Source\EntityGeometry.cpp(1073)
Entity "com_weap_veh_guided_rocket_ord" unknown vehicle collision "p_front_sphere"

Message Severity: 2
.\Source\EntityGeometry.cpp(1065)
Entity "com_weap_veh_guided_rocket_ord" unknown building collision "p_front_sphere"

Message Severity: 2
.\Source\EntityGeometry.cpp(1051)
Entity "com_weap_veh_guided_rocket_ord" unknown targetable collision "CollisionMesh"

Message Severity: 2
.\Source\EntityGeometry.cpp(1058)
Entity "com_weap_award_rocket_launcher_" unknown terrain collision "p_front_sphere"

Message Severity: 2
.\Source\EntityGeometry.cpp(1073)
Entity "com_weap_award_rocket_launcher_" unknown vehicle collision "p_front_sphere"

Message Severity: 2
.\Source\EntityGeometry.cpp(1065)
Entity "com_weap_award_rocket_launcher_" unknown building collision "p_front_sphere"

Message Severity: 2
.\Source\EntityGeometry.cpp(1051)
Entity "com_weap_award_rocket_launcher_" unknown targetable collision "CollisionMesh"

Message Severity: 2
.\Source\VOHelper.cpp(183)
VOSound (all3_inf_pc_com_hostile_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
.\Source\VOHelper.cpp(183)
VOSound (all3_inf_pc_com_bacta_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
.\Source\VOHelper.cpp(183)
VOSound (all3_inf_pc_com_mechanic_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
.\Source\VOHelper.cpp(183)
VOSound (all3_inf_pc_com_ammo_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
.\Source\VOHelper.cpp(183)
VOSound (all3_inf_pc_com_transport_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
.\Source\VOHelper.cpp(183)
VOSound (all3_inf_pc_com_backup_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
.\Source\VOHelper.cpp(183)
VOSound (all3_inf_pc_com_clear_area_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
.\Source\VOHelper.cpp(183)
VOSound (all3_inf_pc_com_defend_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
.\Source\EntityGeometry.cpp(1065)
Entity "com_weap_inf_remotedroid_ord" unknown building collision "p_buildingsphere"

Message Severity: 2
.\Source\EntityGeometry.cpp(1073)
Entity "com_weap_inf_remotedroid_ord" unknown vehicle collision "p_buildingsphere"

Message Severity: 2
.\Source\EntityGeometry.cpp(1089)
Entity "com_weap_inf_remotedroid_ord" unknown ordnance collision "p_sphere"

Message Severity: 2
.\Source\EntityGeometry.cpp(1081)
Entity "com_weap_inf_remotedroid_ord" unknown soldier collision "p_sphere"

Message Severity: 2
.\Source\VOHelper.cpp(196)
unknown VO type: SpottedVO


Message Severity: 2
.\Source\VOHelper.cpp(196)
unknown VO type: NeedRepairVO


Message Severity: 2
.\Source\VOHelper.cpp(196)
unknown VO type: NeedPickupVO


Message Severity: 2
.\Source\VOHelper.cpp(196)
unknown VO type: NeedBackupVO


Message Severity: 2
.\Source\VOHelper.cpp(196)
unknown VO type: DefendPositionVO


Message Severity: 2
.\Source\VOHelper.cpp(183)
VOSound (boba_hero_pc_com_hostile_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
.\Source\VOHelper.cpp(196)
unknown VO type: SpottedVO


Message Severity: 2
.\Source\VOHelper.cpp(183)
VOSound (boba_hero_pc_com_mechanic_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
.\Source\VOHelper.cpp(196)
unknown VO type: NeedRepairVO


Message Severity: 2
.\Source\VOHelper.cpp(183)
VOSound (boba_hero_pc_com_transport_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
.\Source\VOHelper.cpp(196)
unknown VO type: NeedPickupVO


Message Severity: 2
.\Source\VOHelper.cpp(183)
VOSound (boba_hero_pc_com_backup_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
.\Source\VOHelper.cpp(196)
unknown VO type: NeedBackupVO


Message Severity: 2
.\Source\VOHelper.cpp(196)
unknown VO type: InVehicle


Message Severity: 2
.\Source\VOHelper.cpp(183)
VOSound (boba_hero_pc_com_defend_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
.\Source\VOHelper.cpp(196)
unknown VO type: DefendPositionVO


Message Severity: 2
.\Source\EntitySoldier.cpp(10471)
Soldier imp_inf_darktrooper has geometry collision

Message Severity: 2
.\Graphics\Pc\pcRedTexture.cpp(553)
Texture 'e11s' [0f20e71f] uses 1.33 MB

Message Severity: 2
.\Graphics\Pc\pcRedTexture.cpp(553)
Texture 'e11s' [0f20e71f] uses 1.33 MB

Message Severity: 2
.\Source\EntityBuilding.cpp(695)
Building missing explosion "com_weap_bldg_gunturret_exp"
uf_updateClassIndex(): Added class: all_inf_rifleman
uf_updateClassIndex(): Added class: all_inf_rocketeer
uf_updateClassIndex(): Added class: all_inf_sniper
uf_updateClassIndex(): Added class: all_inf_engineer
uf_updateClassIndex(): Added class: all_inf_officer
uf_updateClassIndex(): Added class: all_inf_wookiee
uf_updateClassIndex(): Added class: imp_inf_rifleman
uf_updateClassIndex(): Added class: imp_inf_rocketeer
uf_updateClassIndex(): Added class: imp_inf_sniper
uf_updateClassIndex(): Added class: imp_inf_engineer
uf_updateClassIndex(): Added class: imp_inf_officer
uf_updateClassIndex(): Added class: imp_inf_dark_trooper
uf_updateClassIndex(): Added class: all_hero_hansolo_tat
uf_updateClassIndex(): Added class: imp_hero_bobafett
utility_functions2: ReadDataFile(): This map's code, mode: tgd tgd_conquest

Message Severity: 2
.\Source\SkyManager.cpp(122)
Skyfile FarSceneRange is in old format

Message Severity: 2
.\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 4

Message Severity: 2
.\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 8

Message Severity: 2
.\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 12

Message Severity: 2
.\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 16

Message Severity: 2
.\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 20

Message Severity: 2
.\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 24

Message Severity: 2
.\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 28

Message Severity: 2
.\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 32

Message Severity: 2
.\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 36

Message Severity: 2
.\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 40

Message Severity: 2
.\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 44

Message Severity: 2
.\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 48

Message Severity: 2
.\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 52

Message Severity: 2
.\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 56

Message Severity: 2
.\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 60

Message Severity: 2
.\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 64

Message Severity: 2
.\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 68

Message Severity: 2
.\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 72

Message Severity: 2
.\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 76

Message Severity: 2
.\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 80

Message Severity: 2
.\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 84

Message Severity: 2
.\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 88

Message Severity: 2
.\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 92

Message Severity: 2
.\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 96

Message Severity: 2
.\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 100

Message Severity: 2
.\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 104

Message Severity: 2
.\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 108

Message Severity: 2
.\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 112

Message Severity: 2
.\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 116

Message Severity: 2
.\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 120

Message Severity: 2
.\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 124

Message Severity: 2
.\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 128

Message Severity: 2
.\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 132

Message Severity: 2
.\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 136

Message Severity: 2
.\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 140

Message Severity: 2
.\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 144

Message Severity: 2
.\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 148

Message Severity: 2
.\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 152

Message Severity: 2
.\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 156

Message Severity: 2
.\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 160

Message Severity: 2
.\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 164

Message Severity: 2
.\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 168

Message Severity: 2
.\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 172

Message Severity: 2
.\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 176

Message Severity: 2
.\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 180

Message Severity: 2
.\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 184

Message Severity: 2
.\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 188

Message Severity: 2
.\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 192

Message Severity: 2
.\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 196

Message Severity: 2
.\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 200

Message Severity: 3
.\Source\LuaHelper.cpp(312)
CallProc failed: (none):0: attempt to index global `conquest' (a nil value)
stack traceback:
(none): in function <(none):21>

Re: Problem w/ campaign

Posted: Tue Jan 05, 2010 5:59 pm
by Fiodis
You used hide tags for the LUA but not the much longer error log? :?

A texture uses 1.33 MB? Wow, that's...not sure what to say.

AIAutoBalance makes the AI of one team smarter if they're losing.

Re: Problem w/ campaign

Posted: Tue Jan 05, 2010 6:36 pm
by (Anonymous)
added tags, my mistake, weird thing though. I didn't edit ANYTHING about this map besides the campaign and the goto1 region in ZE. Once again, the only problems are no AI and the objective doesn't run.

Re: Problem w/ campaign

Posted: Tue Jan 05, 2010 6:39 pm
by Eggman
You have these lines twice:


conquest:Start()

EnableSPHeroRules()

Re: Problem w/ campaign

Posted: Tue Jan 05, 2010 6:41 pm
by Darth_Spiderpig
For the AI: You have 4 CPs in ZE?

If not, you have to edit the lua to show the accurate number.

Re: Problem w/ campaign

Posted: Tue Jan 05, 2010 6:44 pm
by (Anonymous)
Thanks for pointing that out, I'll try removing the repeat. And yes, there are four cps in ZE, the default.

EDIT: No good, same problems

New LUA:
Hidden/Spoiler:
SetMemoryPoolSize("EntityCloth", 32)
SetMemoryPoolSize("EntityFlyer", 32)
SetMemoryPoolSize("EntityHover", 32)--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("ObjectiveConquest")
ScriptCB_DoFile("MultiObjectiveContainer")-- I'm not sure what this is for, but it is included in Almost all the Campaign missions
ScriptCB_DoFile("ObjectiveGoto")-- well this speaks for it'selve
ScriptCB_SetGameRules("campaign")
ScriptCB_DoFile("Ambush")-- Jawa's will be ambushing us at the ruble, so we need this

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

function ScriptPostLoad()


ScriptCB_SetGameRules("campaign")-- Here you can see a script being used; The script to define the gameRules(of wich I don't really know what they do EXACTLY)
SetAIDifficulty(0, 0, "medium")-- I'd say this influences the dumbness of the A.I. to compensate for difficult maps.
DisableAIAutoBalance()--Help requested on explaining this



function ScriptPostLoad()


--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
onfirstspawn = OnCharacterSpawn(
function(character)
if IsCharacterHuman(character) then
ReleaseCharacterSpawn(onfirstspawn)
onfirstspawn = nil
objectives_timer = CreateTimer("objectives_timer")
SetTimerValue(objectives_timer, 2)
StartTimer(objectives_timer)
begin_objectives = OnTimerElapse(
function(timer)
StartObjectives ()
ScriptCB_EnableCommandPostVO(0)
end,
objectives_timer
)
end
end
)

--objective 1; Go to the pile of ruble
Objective1 = ObjectiveGoto:New{TeamATT = ATT, --Make a new objective for the attacking team.
text = "level.@#$.objectives.empire.1", popupText = "level.@#$.objectives.empire.1_popup",
--above we tell the game to show the objective we typed in the localisation tool, near the map and in the upperscreen.
regionName = "goto1", mapIcon = "hud_objective_icon_circle", AIGoalWeight = 0}
-- we just told the game to wich region(wich we placed and named in zeroeditor we want the player to go and that the game should indicate this place on the map with a yellow marker. The A.I. Will have no interest in going here(AIGoalWeight = 0)
Objective1.OnStart = function(self)
att_obj1_aigoal = AddAIGoal(ATT, "Deathmatch", 100)
MapAddEntityMarker("goto", "hud_objective_icon", 3.0, 1, "YELLOW", true)
-- here we told the A.I. what to do.
end

Objective1.OnComplete = function(self)
DeleteAIGoal(att_obj1_aigoal)
ShowMessageText("game.objectives.complete")
ShowPopup("level.@#$.objectives.empire.1complete_popup", ATT)
--when the objective is completed, we don't need the A.I. goal anymore, and we want to inform the player that the objective is completed by showing this in the top of the screen and with a popup.
MapRemoveEntityMarker("goto")
-- we don't need that marker anymore so we delete that.
end
--

conquest = ObjectiveConquest:New{teamDEF = DEF,
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)

end
function StartObjectives()
objectiveSequence = MultiObjectiveContainer:New{delayVictoryTime = 4.0 }
objectiveSequence:AddObjectiveSet(Objective1)
objectiveSequence:Start()
end

conquest:Start()

EnableSPHeroRules()

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(40)
SetMaxPlayerFlyHeight(40)


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\\tat.lvl;tat2gcw")
ReadDataFile("SIDE\\all.lvl",
"all_inf_rifleman",
"all_inf_rocketeer",
"all_inf_sniper",
"all_inf_engineer",
"all_inf_officer",
"all_inf_wookiee",
"all_hero_hansolo_tat")

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_fly_destroyer_dome" )

ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_tat_barge",
"tur_bldg_laser")

SetupTeams{
all = {
team = ALL,
units = 20,
reinforcements = 150,
soldier = { "all_inf_rifleman",9, 25},
assault = { "all_inf_rocketeer",1,4},
engineer = { "all_inf_engineer",1,4},
sniper = { "all_inf_sniper",1,4},
officer = { "all_inf_officer",1,4},
special = { "all_inf_wookiee",1,4},

},
imp = {
team = IMP,
units = 20,
reinforcements = 150,
soldier = { "imp_inf_rifleman",9, 25},
assault = { "imp_inf_rocketeer",1,4},
engineer = { "imp_inf_engineer",1,4},
sniper = { "imp_inf_sniper",1,4},
officer = { "imp_inf_officer",1,4},
special = { "imp_inf_dark_trooper",1,4},
},
}

SetHeroClass(ALL, "all_hero_hansolo_tat")
SetHeroClass(IMP, "imp_hero_bobafett")

Re: Problem w/ campaign

Posted: Tue Jan 05, 2010 9:40 pm
by [RDH]Zerted
(Anonymous) wrote:Thanks for pointing that out, I'll try removing the repeat...
You removed the wrong ones and you also have to remove the end after it.

Re: Problem w/ campaign

Posted: Wed Jan 06, 2010 4:30 pm
by (Anonymous)
oh, I'll try that, thanks :D

EDIT: YAY, partial success, the objective runs but the arrow pointer thingy doesn't show up.