Campaign Scripting error and advice [Solved]

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
FelixXxX
Private Third Class
Posts: 56
Joined: Mon Mar 02, 2009 11:04 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Bespin

Campaign Scripting error and advice [Solved]

Post by FelixXxX »

I am working on a camaign script and i am getting an error that prevents the map from working
Hidden/Spoiler:
C:\BF2_ModTools\ToolsFL\Bin\luac.exe: ..\..\common\scripts\AFC\AFCc_c.lua:65: <name> expected near `('
ERROR[scriptmunge scripts\AFC\AFCc_c.lua]:Could not read input file.ERROR[scriptmunge scripts\AFC\AFCc_c.lua]:Could not read input file. [continuing]
2 Errors 0 Warnings

ERROR[levelpack mission\AFCc_c.req]:Expecting bracket, but none was found.
File : munged\pc\afcc_c.script.req(1)...

ucft <--
ERROR[levelpack mission\AFCc_c.req]:Expecting bracket, but none was found.
File : munged\pc\afcc_c.script.req(1)...

ucft <--

2 Errors 0 Warnings
and here is my script so far
Hidden/Spoiler:
--
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--


-- Republic Attacking (attacker is always #1)
REP = 1;
CIS = 2;
-- These variables do not change
ATT = REP;
DEF = CIS;
AmbushTeam = 7
DEC = AmbushTeam
-- load the gametype script
ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("ObjectiveAssault")
ScriptCB_DoFile("ObjectiveGoto")
ScriptCB_DoFile("ObjectiveConquest")
ScriptCB_DoFile("ObjectiveCTF")
ScriptCB_DoFile("ObjectiveTDM")
ScriptCB_DoFile("MultiObjectiveContainer")
ScriptCB_DoFile("Ambush")
---------------------------------------------------------------------------
-- 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 ScriptPostLoad()
SetupAmbush("ambushregion1", 10, 5)
SetAIDifficulty(1, -3, "medium")
ScriptCB_SetGameRules("campaign")
onfirstspawn = OnCharacterSpawn(
function(character)
if character == 0 then
ShowPopup("level.geo1.hints.hints")
ReleaseCharacterSpawn(onfirstspawn)
onfirstspawn = nil
BeginObjectivesTimer()
ScriptCB_EnableCommandPostVO(0)

end
end)

ActivateRegion("Ambushregion1")

Objective1 = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF, text = "level.AFC.objectives.1", popupText = "level.AFC.objectives.campaign.1_popup", AIGoalWeight = 0}
Objective1.OnStart = function(self)
AddAIGoal(5, "Defend", 99999, "CAM_CP1")
hangar_ambush_timer = CreateTimer("hanger_ambush_timer")
SetTimerValue(hanger_ambush_timer, 200)
StartTimer(hangar_ambush_timer)
MapAddEntityMarker("CAM_CP1", "hud_objective_icon_circle", 3.0, ATT, "YELLOW", true, true, true)
hangar_ambush_go = OnTimerElapse(
function(timer)
Ambush("Ambushregion1_ambush_spawn", 10, 5)
--ShowMessageText("level.dea1.hangar_ambush", ATT)
SetTimerValue(Ambushregion1_ambush_timer, 10)

ReleaseTimerElapse(hangar_ambush_go)
hangar_ambush_off = OnTimerElapse(hangar_ambush_off)
function(timer)
ReleaseTimerElapse(hangar_ambush_off)
end,
hangar_ambush_timer
)
end,
hangar_ambush_timer
)

end,
)
AddAIGoal(ATT, "Defend", 9999, "CAM_CP1")
-- tell the alliance to take over that CP
AddAIGoal(DEF, "Conquest", 9999)
SetProperty("cam_cp1", "Value_ATK_Alliance", 100)
-- but not the other one, since you can't capture it
SetProperty("imp_base", "Value_ATK_Alliance", 0)
SetProperty("imp_base", "Value_DEF_Alliance", 0)
-- and have these guys defend it
SetProperty("cam_cp1", "Value_DEF_Empire", 100)
SetProperty("imp_base", "Value_DEF_Empire", 0)
SetProperty("cam_cp2", "Value_ATK_Empire", 0)

SetProperty("CAM_CP2", "Value_DEF_Alliance", 0)

end










ReadDataFile("sound\\myg.lvl;myg1cw")


ReadDataFile("dc:SIDE\\rep.lvl",
"rep_inf_ep3_rifleman",
"rep_inf_ep2_rifleman",
"rep_inf_ep3_rocketeer",
"rep_inf_ep3_engineer",
"rep_inf_ep3_sniper",
"rep_inf_ep3_officer",
"rep_inf_ep3_jettrooper",
"rep_inf_clone_assassin",
"rep_hover_fightertank",
"rep_hero_saesee",
"rep_hover_barcspeeder")

ReadDataFile("SIDE\\cis.lvl",
"cis_inf_rifleman",
"cis_inf_rocketeer",
"cis_inf_engineer",
"cis_inf_sniper",
"cis_inf_officer",
"cis_inf_droideka",
"cis_hero_darthmaul",
"cis_hover_aat")
SetupTeams{
rep = {
team = REP,
units = 30,
reinforcements = 150,
soldier = { "rep_inf_ep3_engineer",1, 4},
sniper = { "rep_inf_ep3_sniper",1, 4},
assault = { "rep_inf_ep3_officer",1, 4},
engineer = { "rep_inf_ep3_jettrooper",1, 4},
officer = {"rep_inf_clone_assassin",1, 3},
special = { "rep_inf_ep2_rifleman",1, 2},
AddUnitClass(REP,"rep_inf_ep3_rifleman",9, 25),
AddUnitClass(REP,"rep_inf_ep3_rocketeer",1, 4),
},
cis = {
team = CIS,
units = 30,
reinforcements = 150,
soldier = { "cis_inf_rifleman",9, 25},
assault = { "cis_inf_rocketeer",1, 4},
engineer = { "cis_inf_engineer",1, 4},
sniper = { "cis_inf_sniper",1, 4},
officer = {"cis_inf_officer",1, 4},
special = { "cis_inf_droideka",1, 4},
},
dec = {
team = DEC
units = 10
reinforcements = -1
soldier = { "cis_inf_rocketeer",10,11},
}
}

SetTeamAsFriend(DEC, CIS)
SetTeamAsFriend(CIS, DEC)
SetTeamAsEnemy(DEC, REP)
SetTeamAsEnemy(REP, DEC)
ClearAIGoals(ATM)
AddAIGoal(DEC, "Conquest",500)
-- Level Stats
ClearWalkers()
AddWalkerType(0, 4)
AddWalkerType(2, 0)
AddWalkerType(1, 4) -- ATRTa (special case: 0 leg pairs)
local weaponCnt= 240
SetMemoryPoolSize("Aimer", 70)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 230)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 24)
SetMemoryPoolSize("EntityFlyer", 3)
SetMemoryPoolSize("EntityHover", 6)
SetMemoryPoolSize("EntitySoundStream", 1)
SetMemoryPoolSize("EntitySoundStatic", 76)
SetMemoryPoolSize("FlagItem", 1)
SetMemoryPoolSize("EntityFlyer", 6)
SetMemoryPoolSize("MountedTurret", 16)
SetMemoryPoolSize("Navigator", 45)
SetMemoryPoolSize("Obstacle", 500)
SetMemoryPoolSize("PathFollower", 45)
SetMemoryPoolSize("PathNode", 256)
SetMemoryPoolSize("TentacleSimulator", 0)
SetMemoryPoolSize("TreeGridStack", 300)
SetMemoryPoolSize("UnitAgent", 60)
SetMemoryPoolSize("UnitController", 60)
SetMemoryPoolSize("Weapon", weaponCnt)

SetSpawnDelay(10.0, 0.25)
--ReadDataFile("dc:AFC\\AFC.lvl", "AFC_campaign")
ReadDataFile("dc:AFC\\AFC.lvl", "AFC_campaign")
SetDenseEnvironment("false")

-- Sound Stats

voiceSlow = OpenAudioStream("sound\\global.lvl", "myg_objective_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "rep_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)

voiceQuick = OpenAudioStream("sound\\global.lvl", "cis_unit_vo_quick")
AudioStreamAppendSegments("sound\\global.lvl", "rep_unit_vo_quick", voiceQuick)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_quick", voiceQuick)

OpenAudioStream("sound\\global.lvl", "cw_music")
OpenAudioStream("sound\\myg.lvl", "myg1")
OpenAudioStream("sound\\myg.lvl", "myg1")
-- OpenAudioStream("sound\\myg.lvl", "myg_objective_vo_slow")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
-- OpenAudioStream("sound\\myg.lvl", "myg1_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(1, "Repleaving")
SetOutOfBoundsVoiceOver(2, "Cisleaving")

-- SetAmbientMusic(REP, 1.0, "rep_myg_amb_start", 0,1)
-- SetAmbientMusic(REP, 0.99, "rep_myg_amb_middle", 1,1)
-- SetAmbientMusic(REP, 0.1,"rep_myg_amb_end", 2,1)
-- SetAmbientMusic(CIS, 1.0, "cis_myg_amb_start", 0,1)
-- SetAmbientMusic(CIS, 0.99, "cis_myg_amb_middle", 1,1)
-- SetAmbientMusic(CIS, 0.1,"cis_myg_amb_end", 2,1)

SetVictoryMusic(REP, "rep_myg_amb_victory")
SetDefeatMusic (REP, "rep_myg_amb_defeat")
SetVictoryMusic(CIS, "cis_myg_amb_victory")
SetDefeatMusic (CIS, "cis_myg_amb_defeat")

SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
--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")


--Camera Shizzle--

-- Collector Shot
AddCameraShot(0.008315, 0.000001, -0.999965, 0.000074, -64.894348, 5.541570, 201.711090);
AddCameraShot(0.633584, -0.048454, -0.769907, -0.058879, -171.257629, 7.728924, 28.249359);
AddCameraShot(-0.001735, -0.000089, -0.998692, 0.051092, -146.093109, 4.418306, -167.739212);
AddCameraShot(0.984182, -0.048488, 0.170190, 0.008385, 1.725611, 8.877428, 88.413887);
AddCameraShot(0.141407, -0.012274, -0.986168, -0.085598, -77.743042, 8.067328, 42.336128);
AddCameraShot(0.797017, 0.029661, 0.602810, -0.022434, -45.726467, 7.754435, -47.544712);
AddCameraShot(0.998764, 0.044818, -0.021459, 0.000963, -71.276566, 4.417432, 221.054550);


end
Also i have only put in one objective and if someone could help me along the way if i need it and also this is supposed to be like death star when u must defend the hanger thanks!
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: Campaign Scripting error and advice

Post by Teancum »

C:\BF2_ModTools\ToolsFL\Bin\luac.exe: ..\..\common\scripts\AFC\AFCc_c.lua:65:
There's an error on line 65 of your lua. Look to see if you're missing quotes, parenthesis or something like that.
Commander_Fett
High General
High General
Posts: 847
Joined: Fri Oct 17, 2008 9:59 pm
Projects :: No Mod project currently.

Re: Campaign Scripting error and advice

Post by Commander_Fett »

Also, I'm pretty sure you have to set up locals in the order thay apear. ATT and DEF are 1 and 2, but they can apear at any time. However, extra teams, like the ambushers, have to have their team number set for the order in which they apear. So, with

Code: Select all

AmbushTeam = 7
you set it so it went 1,2,7, which I'm pretty sure won't work. Correct me if I'm wrong, though.
User avatar
FelixXxX
Private Third Class
Posts: 56
Joined: Mon Mar 02, 2009 11:04 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Bespin

Re: Campaign Scripting error and advice

Post by FelixXxX »

ok..... I completely fixed my lua script and there are no errors at all in the error log or munge log. Now i have a more difficult problem..... When ever i start the map it instantly crashes... not the fatal cannot read Mission.lvl stuff. Here is my error log
Hidden/Spoiler:
Opened logfile BFront2.log 2009-03-17 1607
shell_interface: Entered
shell_interface: Reading in custom strings
ifs_era_handler - Entered
ifs_era_handler - Exited
custom_GetSPMissionList()
custom_GetMPMissionList()
custom_EraButtonList(): Building era button table
custom_EraButtonList(): Finished building era button table Known eras buttons: 28
custom_GetGMapEras(): Building era table
custom_GetGMapEras(): Finished building era table Known eras: 28
custom_GetGMapModes(): Building game mode table
custom_GetGMapModes(): Finished building game mode table Known Modes: 38
custom_GetMPGameModeList(): Building game mode list table
custom_GetMPGameModeList(): Finished building game mode list table List Length: 39
custom_SetMovieLocation()
custom_AddEraBoxes()
custom_SetMovieLocation()
custom_AddEraBoxes()
ingame stream movies\crawl.mvs
shell_interface: Opening movie: movies\shell.mvs
shell_interface: Leaving

Message Severity: 3
.\Source\LuaCallbacks_Mission.cpp(866)
Lua ReadDataFile: Could not open ..\..\addon\KA2\data\_LVL_PC\core.lvl
prev = none iLastPage = nil
prev = texture iLastPage = 1
prev = texture iLastPage = 2
prev = texture iLastPage = 3
ifs_legal.Exit

Message Severity: 2
.\Source\GameMovie.cpp(399)
Unable to find open movie segment shell_main

ifs_saveop_DoOps LoadFileList
ifs_saveop_DoOps LoadFileList
ifs_saveop_DoOps LoadProfile
ifs_saveop_DoOps LoadProfile
ifs_missionselect_pcMulti_fnSetMapPreview(): Defaulting index to 1
this.CurButton = nil
cur_button = nil
this.CurButton = check_mode10
cur_button = nil
Checkbox for check_era3 clicked
this.CurButton = check_era3
cur_button = nil
custom_AddMapNew()
custom_printTable(): table: 03CC11CC
The key, value is: era_g 1
The key, value is: mode_con_c 1
and here is my lua script NOTE NO ERRORS IN IT NOW
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--


-- Republic Attacking (attacker is always #1)
REP = 1;
CIS = 2;
-- These variables do not change
ATT = REP;
DEF = CIS;
AmbushTeam = 5
ATM = AmbushTeam
-- load the gametype script
ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("ObjectiveAssault")
ScriptCB_DoFile("ObjectiveGoto")
ScriptCB_DoFile("ObjectiveConquest")
ScriptCB_DoFile("ObjectiveCTF")
ScriptCB_DoFile("ObjectiveTDM")
ScriptCB_DoFile("MultiObjectiveContainer")
ScriptCB_DoFile("Ambush")





function ScriptPostLoad()
SetupAmbush("ambushregion1", 10, 5)
SetAIDifficulty(1, -3, "medium")
ScriptCB_SetGameRules("campaign")
AICanCaptureCP("CAM_CP3", ATT, false)
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
)



Objective1 = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF, text = "level.AFC.objectives.1", popupText = "level.AFC.objectives.campaign.1_popup", AIGoalWeight = 0}
Objective1.OnStart = function(self)
AddAIGoal(5, "Defend", 99999, "CAM_cp1")
CAM_cp1 = CreateTimer("Ambush_CAM_cp1")
SetTimerValue(Ambush_CAM_cp1, 480)
ActivateRegion("Ambushregion1")
StartTimer(Ambush_CAM_cp1)
MapAddEntityMarker("CAM_CP1", "hud_objective_icon_circle", 3.0, ATT, "YELLOW", true, true, true)
AddAIGoal(ATT, "Defend", 99999, "CAM_cp1")
AddAIGoal(DEF, "Defend", 99999, "CAM_cp1")
AddAIGoal(5, "Defend", 99999, "CAM_cp1")

end

Objective1.OnComplete = function(self, winningTeam)
if winningTeam == ATT then
RespawnObject("CAM_CP2")
MapRemoveEntityMarker("CAM_cp1")
ClearAIGoals(ATT)
ClearAIGoals(DEF)
ClearAIGoals(5)
ShowMessageText("game.objectives.complete", ATT)
SetReinforcementCount(ATT, ATT_ReinforcementCount + 50)
end
functionStartObjectives()
objectiveSequence = MultiObjectiveContainer:New{delayVictoryTime = 4.0 }
objectiveSequence:AddObjectiveSet(Objective1)
objectiveSequence:Start()
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.
---------------------------------------------------------------------------





ReadDataFile("sound\\myg.lvl;myg1cw")


ReadDataFile("dc:SIDE\\rep.lvl",
"rep_inf_ep3_rifleman",
"rep_inf_ep2_rifleman",
"rep_inf_ep3_rocketeer",
"rep_inf_ep3_engineer",
"rep_inf_ep3_sniper",
"rep_inf_ep3_officer",
"rep_inf_ep3_jettrooper",
"rep_inf_clone_assassin",
"rep_hover_fightertank",
"rep_hero_saesee",
"rep_hover_barcspeeder")

ReadDataFile("SIDE\\cis.lvl",
"cis_inf_rifleman",
"cis_inf_rocketeer",
"cis_inf_engineer",
"cis_inf_sniper",
"cis_inf_officer",
"cis_inf_droideka",
"cis_hero_darthmaul",
"cis_hover_aat")
SetupTeams{
rep = {
team = REP,
units = 15,
reinforcements = 40,
soldier = { "rep_inf_ep3_engineer",1, 4},
sniper = { "rep_inf_ep3_sniper",1, 4},
assault = { "rep_inf_ep3_officer",1, 4},
engineer = { "rep_inf_ep3_jettrooper",1, 4},
officer = {"rep_inf_clone_assassin",1, 3},
special = { "rep_inf_ep2_rifleman",1, 2},
AddUnitClass(REP,"rep_inf_ep3_rifleman",9, 25),
AddUnitClass(REP,"rep_inf_ep3_rocketeer",1, 4),
},
cis = {
team = CIS,
units = 20,
reinforcements = -1,
soldier = { "cis_inf_rifleman",9, 25},
assault = { "cis_inf_rocketeer",1, 4},
engineer = { "cis_inf_engineer",1, 4},
sniper = { "cis_inf_sniper",1, 4},
officer = {"cis_inf_officer",1, 4},
special = { "cis_inf_droideka",1, 4},
},
atm = {
team = ATM,
units = 10,
reinforcements = -1,
soldier = { "cis_inf_rocketeer",10,11},
}
}



SetTeamAsFriend(ATM, CIS)
SetTeamAsFriend(CIS, ATM)
SetTeamAsEnemy(ATM, REP)
SetTeamAsEnemy(REP, ATM)
SetTeamName(ATM, CIS)
ClearAIGoals(ATM)
AddAIGoal(DEC, "Conquest",500)
-- Level Stats
ClearWalkers()
AddWalkerType(0, 4)
AddWalkerType(2, 0)
AddWalkerType(1, 4) -- ATRTa (special case: 0 leg pairs)
local weaponCnt= 240
SetMemoryPoolSize("Aimer", 70)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 230)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 24)
SetMemoryPoolSize("EntityFlyer", 3)
SetMemoryPoolSize("EntityHover", 6)
SetMemoryPoolSize("EntitySoundStream", 1)
SetMemoryPoolSize("EntitySoundStatic", 76)
SetMemoryPoolSize("FlagItem", 1)
SetMemoryPoolSize("EntityFlyer", 6)
SetMemoryPoolSize("MountedTurret", 16)
SetMemoryPoolSize("Navigator", 45)
SetMemoryPoolSize("Obstacle", 500)
SetMemoryPoolSize("PathFollower", 45)
SetMemoryPoolSize("PathNode", 256)
SetMemoryPoolSize("TentacleSimulator", 0)
SetMemoryPoolSize("TreeGridStack", 300)
SetMemoryPoolSize("UnitAgent", 60)
SetMemoryPoolSize("UnitController", 60)
SetMemoryPoolSize("Weapon", weaponCnt)

SetSpawnDelay(10.0, 0.25)
--ReadDataFile("dc:AFC\\AFC.lvl", "AFC_campaign")
ReadDataFile("dc:AFC\\AFC.lvl", "AFC_campaign")
SetDenseEnvironment("false")

-- Sound Stats

voiceSlow = OpenAudioStream("sound\\global.lvl", "myg_objective_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "rep_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)

voiceQuick = OpenAudioStream("sound\\global.lvl", "cis_unit_vo_quick")
AudioStreamAppendSegments("sound\\global.lvl", "rep_unit_vo_quick", voiceQuick)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_quick", voiceQuick)

OpenAudioStream("sound\\global.lvl", "cw_music")
OpenAudioStream("sound\\myg.lvl", "myg1")
OpenAudioStream("sound\\myg.lvl", "myg1")
-- OpenAudioStream("sound\\myg.lvl", "myg_objective_vo_slow")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
-- OpenAudioStream("sound\\myg.lvl", "myg1_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(1, "Repleaving")
SetOutOfBoundsVoiceOver(2, "Cisleaving")

-- SetAmbientMusic(REP, 1.0, "rep_myg_amb_start", 0,1)
-- SetAmbientMusic(REP, 0.99, "rep_myg_amb_middle", 1,1)
-- SetAmbientMusic(REP, 0.1,"rep_myg_amb_end", 2,1)
-- SetAmbientMusic(CIS, 1.0, "cis_myg_amb_start", 0,1)
-- SetAmbientMusic(CIS, 0.99, "cis_myg_amb_middle", 1,1)
-- SetAmbientMusic(CIS, 0.1,"cis_myg_amb_end", 2,1)

SetVictoryMusic(REP, "rep_myg_amb_victory")
SetDefeatMusic (REP, "rep_myg_amb_defeat")
SetVictoryMusic(CIS, "cis_myg_amb_victory")
SetDefeatMusic (CIS, "cis_myg_amb_defeat")

SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
--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")


--Camera Shizzle--

-- Collector Shot
AddCameraShot(0.008315, 0.000001, -0.999965, 0.000074, -64.894348, 5.541570, 201.711090);
AddCameraShot(0.633584, -0.048454, -0.769907, -0.058879, -171.257629, 7.728924, 28.249359);
AddCameraShot(-0.001735, -0.000089, -0.998692, 0.051092, -146.093109, 4.418306, -167.739212);
AddCameraShot(0.984182, -0.048488, 0.170190, 0.008385, 1.725611, 8.877428, 88.413887);
AddCameraShot(0.141407, -0.012274, -0.986168, -0.085598, -77.743042, 8.067328, 42.336128);
AddCameraShot(0.797017, 0.029661, 0.602810, -0.022434, -45.726467, 7.754435, -47.544712);
AddCameraShot(0.998764, 0.044818, -0.021459, 0.000963, -71.276566, 4.417432, 221.054550);


end
And here is my mission.lvl for campaign
Hidden/Spoiler:
ucft
{
REQN
{
"script"
"AFCc_c"
}
}
Also is their something i must run to make the campaign mode work like a campaign scripter or worker or something? Thanks for looking at this.
Commander_Fett
High General
High General
Posts: 847
Joined: Fri Oct 17, 2008 9:59 pm
Projects :: No Mod project currently.

Re: Campaign Scripting error and advice

Post by Commander_Fett »

So, you edited the mission.req, what about making the mode's req and adding it to the addme.lua?
User avatar
FelixXxX
Private Third Class
Posts: 56
Joined: Mon Mar 02, 2009 11:04 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Bespin

Re: Campaign Scripting error and advice

Post by FelixXxX »

I did that and u want to know what? i am stupid
---------------------------------------------------------------------------





ReadDataFile("sound\\myg.lvl;myg1cw")


ReadDataFile("dc:SIDE\\rep.lvl",
"rep_inf_ep3_rifleman",
"rep_inf_ep2_rifleman",
"rep_inf_ep3_rocketeer",
"rep_inf_ep3_engineer",
"rep_inf_ep3_sniper",
i forgot the most simple thing....
Hidden/Spoiler:
function ScriptInit()

ReadDataFile("ingame.lvl")
so it never started to read the script after the objectives...
i had destroyed all hopes my findings will renew my need for a campaign mode! and after all i will need more help as i go along lol I SHALL RETURN!
Let this be a lesson to all u modders who read this :plokoon: :plokoon:
Post Reply