Find us also on: on facebook on ModDB.com
regular Scripting Method

this article is dedicated to instruct you how to integrate the HaZardModding Co-op Mod into your level.

You need
  • a compiled map
  • a script file for your map
  • a Texteditor

If you have no script file you can create one, by creating a new txt file and renaming the file-extension to .scr
Windows will assume that it is a Screensaver file, so you might not be able to open it by double clicking.

Drag and drop the script file into any Texteditor or open the script-file from within the Texteditor menu.

File Name

The script-file has to have the same file-name as your map.
Example: Your map name is coop_testmap then the script-file would be named: coop_testmap.scr

The following files you should have:

  • coop_testmap.map
  • coop_testmap.bsp
  • coop_testmap.scr
The script-file

To simplify this article it is assumed that your script-file is currently empty.

The scripts in ef2 get compiled and executed once the bsp-file is loaded and processed.The game will automatically execute a thread named main, this is meant to set the script in motion. From within the main thread the script starts, unless the main thread does not exists.

Threads in the script can also be started by a trigger or game event.

The shown example script is including and starting the Co-op Mod.

//SCRIPT DECLARATION
void main();

//INCLUDE other script files
#include "coop_mod/maps/main.scr"

//Script Functions
void
main()
{
//signals the mod to display objectives without $$ pre/suffix
//Use this if you want to specify your own objectives
coop_string_objectiveLoc =
""
;
//show sucess hud instead of just loading the next map
//Use this if your mission ends after this level is completed
coop_bool_showMissionSucessHud =
1
;
//set objectives for this level
coop_string_objectiveItem1 =
"This is the objective text 1"
;
coop_string_objectiveItem2 =
"This is the objective text 2"
;
coop_string_objectiveItem3 =
""
;
coop_string_objectiveItem4 =
""
;
coop_string_objectiveItem5 =
""
;
coop_string_objectiveItem6 =
""
;
coop_string_objectiveItem7 =
""
;
coop_string_objectiveItem8 =
""
;
//set weapons to give to the player when he spawns
coop_string_weapon1 =
"models/weapons/worldmodel-burstrifle.tik"
;
coop_string_weapon2 =
"models/weapons/worldmodel-phaser-stx.tik"
;
coop_string_weapon3 =
"models/weapons/worldmodel-tricorder-stx.tik"
;
coop_string_weapon4 =
""
;
coop_string_weapon5 =
""
;
coop_string_weapon6 =
""
;
coop_string_weapon7 =
""
;
coop_string_weapon8 =
""
;
//Start the Co-Op Script
globalCoop_main();
}


That's it

The Co-op Mod should now work the next time you load your level.

 

Elite Force II Serverlist empty ? Read how to set the alternative Master-Server.

Elite Force II to expensive ? Try eBay Germany and use our Language-pack!

TM and © 2000 Paramount Pictures. All rights reserved. Star Trek and related marks are trademarks of Paramount Pictures.
© and TM 2000 Activision, Inc. All rights reserved.