Empire Earth 2 Map making - MP - .ies Scripting

ImageImageTalking about Modding for EE2 and EE2 AOS. New maps, patches, programs and Multiplayer scenarios.
User avatar
Dr.MonaLisa
High Representative
Posts: 7837
Joined: 17 Jun 2010, 11:21
Location: Poland

Re: Empire Earth 2 Map making - MP - .ies Scripting

Post by Dr.MonaLisa »

That's quite "illegal" to use "DoDelay" in the initialization section.

All your stuff should go to the ONESHOT rule.
Example from Pirates Scenario:

Code: Select all

RULE Start ONESHOT
if ((GetElapsedGameTime() > 7))
  then Start
END_RULE
ACTION Start
SCRIPT WORLD
SelectGroup("Pirates");
SetSelectionStance(kStanceType_Aggressive);
SetSelectionFormation("StaggeredLine");
SearchAndDestroyWithSelection();
END_SCRIPT
END_ACTION
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains

User avatar
Gonzalo
Posts: 205
Joined: 24 Aug 2018, 08:56

Re: Empire Earth 2 Map making - MP - .ies Scripting

Post by Gonzalo »

Very useful, thank you very much Leader.
But something strange occurs, I get two different messages but the second appears without readable text, only the formatted constant representing the real message. Here is my code:

Code: Select all

RULE Start ONESHOT
if ((GetElapsedGameTime() > 1.0))
  then Start
END_RULE
ACTION Start
SCRIPT WORLD
PrintSubtitle("tx_mydialog_film1");
DoDelayUntilCinematicTime(9.0);
STEP
PrintSubtitle("tx_mydialog_film2");
DoDelayUntilCinematicTime(10.0);
STEP
END_SCRIPT
END_ACTION 
Please help...

Added after 2 hours 25 minutes 27 seconds:
Problem solved. Here is my code:

Code: Select all

//////////////////////////////////////////////////////////// 
// TOBRUK.ies 
// 
// Author: Michael34
// Copy Right: 17 February 2012
//////////////////////////////////////////////////////////// 


//////////////////////////////////////////////////////////// 
// All rules are for the WORLD entity. 
////////////////////////////////////////////////////////////

RULES FOR WORLD

SCENARIO
 
name = "Tobruk" 
brief = "Lead British forces through Sahara desert to take over the fortified German city of Tobruk." 
//victory = "You are victorious!" 
//loss = "You have lost." 
hints = "" 
historicalInfo = "In 1941, the German aided the Italian to keep their possessions in Lybia against the English. Marschall Erwin Rommel occupied Tobruk. A british army, under general Montgomery's command, will try to recover Tobruk." 
//description = "DESCRIPTION(This is only for you to read)" 
date = "23 Juny 2020" 

END_SCENARIO 

DEFINITIONS 


END_DEFINITIONS

INITIALIZATION


PauseCalendar(false);
PauseWeatherSystem(false);








StartPlayingCinematic("Cinematic");



END_INITIALIZATION

// //////////////////////////////////////////////////////////// 
// //RUNS AFTER CINEMATIC, BEFORE OBJECTIVES OPEN 
// //////////////////////////////////////////////////////////// 
RULE Start ONESHOT
if ((GetElapsedGameTime() > 0.0))
  then Start
END_RULE
ACTION Start
SCRIPT WORLD
PrintSubtitle("tx_mydialog_film1");
DoDelayUntilCinematicTime(10.0);
STEP
PrintSubtitle("Will you be able to defeat Rommel forces and take Tobruk before German reinforcements come from Sardinia?");
DoDelayUntilCinematicTime(5.0);
STEP
END_SCRIPT
END_ACTION 

//////////////////////////////////////////////////////////// 
// EOF 
//////////////////////////////////////////////////////////// 
Post Reply

Return to “EE2 files, modding, maps, testing, etc.”