Announcing: How to add intro and outro movies in your maps.
Posted: Sat Feb 25, 2006 10:12 am
Hey ya'll.
since the first day I had the modding tools, I managed to use intro and outro movies which is in the game.
They work in Single Player (Instant Action) and 3 minute ago, I played the map on-line with Dragonum - so these movies actually works online!
all you gotta do, is to create a new map, and in the .lua file(s) you add this:
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
-- load the gametype script
ScriptCB_DoFile("ObjectiveConquest")
ScriptCB_DoFile("setup_teams")
-- REP Attacking (attacker is always #1)
REP = 1;
CIS = 2;
-- These variables do not change
ATT = REP;
DEF = CIS;
function ScriptPostLoad()
SetAIDifficulty(2, -8, "medium")
AllowAISpawn(REP, true)
SetMissionEndMovie("ingame.mvs", "geomon02")
AddAIGoal(3, "Deathmatch", 100)
ScriptCB_SetGameRules("campaign") ScriptCB_PlayInGameMovie("ingame.mvs", "geomon01")
SetMissionEndMovie("ingame.mvs", "cormon02
--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()
EnableSPHeroRules()
end
etc.
notice the green codes. There's actually a reason, that there are 2 SetMissionEndMovie
I tried with only one of them, but then nothing happens - so I guess it's vital to have an extra SetMissionEndMovie which matches the ScriptCB_PlayInGameMovie.
Nonetheless, it'll only play the last SetMissionEndMovie.
and it DOES work in Multiplayer.
in case you're not all convinced, I'm gonna upload the map to the Gametoast Downloads Area: it plays the Geonosis Intro, and ends with outro of Knightfall
I've only let it play it in Clone Wars, so you can see the difference with movies and without movies
I hope you all can enjoy it
since the first day I had the modding tools, I managed to use intro and outro movies which is in the game.
They work in Single Player (Instant Action) and 3 minute ago, I played the map on-line with Dragonum - so these movies actually works online!
all you gotta do, is to create a new map, and in the .lua file(s) you add this:
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
-- load the gametype script
ScriptCB_DoFile("ObjectiveConquest")
ScriptCB_DoFile("setup_teams")
-- REP Attacking (attacker is always #1)
REP = 1;
CIS = 2;
-- These variables do not change
ATT = REP;
DEF = CIS;
function ScriptPostLoad()
SetAIDifficulty(2, -8, "medium")
AllowAISpawn(REP, true)
SetMissionEndMovie("ingame.mvs", "geomon02")
AddAIGoal(3, "Deathmatch", 100)
ScriptCB_SetGameRules("campaign") ScriptCB_PlayInGameMovie("ingame.mvs", "geomon01")
SetMissionEndMovie("ingame.mvs", "cormon02
--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()
EnableSPHeroRules()
end
etc.
notice the green codes. There's actually a reason, that there are 2 SetMissionEndMovie
I tried with only one of them, but then nothing happens - so I guess it's vital to have an extra SetMissionEndMovie which matches the ScriptCB_PlayInGameMovie.
Nonetheless, it'll only play the last SetMissionEndMovie.
and it DOES work in Multiplayer.
in case you're not all convinced, I'm gonna upload the map to the Gametoast Downloads Area: it plays the Geonosis Intro, and ends with outro of Knightfall
I've only let it play it in Clone Wars, so you can see the difference with movies and without movies
I hope you all can enjoy it