Notices

Go Back   FileFront Forums > The Games! > Star Trek: Elite Force Series > ST:EF Modding, Mapping and Editing

Remember Me?

ST:EF Modding, Mapping and Editing
Want more info about a Mod? Making a Mod? Looking for Modders, Mappers, Skinners, etc.? This is your Spot!

Reply
 
LinkBack Thread Tools Display Modes
4892945
ST:EF2 Scriptipting, level end/map change.
Chrissstrahl
May 18th, 2009 06:29 AM
I have noticed that there is a need to put a tutorial like this on-line, so here it is, perhaps I'll do a full introduction to the ST:EF2 scripting system soon.

THE WORKING-DIRECTORY

Your working directory is the maps directory of your game,
if you have created a map already you should know the location.
If you do not know the location search for your STEF2 base folder.
On default it is: c:\Programms\Activision\EF2\base\
If you can't find it search for ef2.exe, once you have found the
directory in which ef2.exe is located you should be able to find a
folder called base inside it.

THE X-FILE
Create a txt file as your map name is, for example if your map name
is sangreal then the txt file must be named sangreal too.
You have to rename the extension of this file, instead of sangreal.txt
it must be sangreal.scr.
Open sangreal.scr, with a text Editor, I recommend Notepad++,
there you can select c++ highlighting, that will help.

You need to have:
sangreal.bsp -> The level
sangreal.scr -> The level-script


BE ADVISED
To not use to simple function names, since the game might
has already a function with the same name.
Search here if your function name is already in use.


Opening the X-Files
Once you have your sangreal.scr open it must be empty.
Adding a function works like this:
PHP Code:
void doLoadNextLevel()
{
//create the a trigger to end the current level
    
spawn("trigger_changelevel","targetname","endLevelNow","map","");
//wait for the trigger to be created
    
wait(.05);
//fire the trigger, and end the level
    
triggerEntity($endLevelNow);
//now wait a moment (not to long) to show the mission success hud
    
wait(4);
//now load the next map
    
stuffCMD("map zoo1");//replace zoo1 with your own mapname

Now you need to place a trigger on the map which calls this thread.


MAKE IT WORK
To make this script work you need to place a trigger on you map
where the player has to walk into, at best you use trigger_once.
This trigger has to fill the area where the player walks so the player
can't crouch under, jump over or walk next to the trigger.

This trigger has to call the function called "doLoadNextLevel",
names are case sensitive, this means every upper-case and lower-case
letter makes a difference to the scripts, you need to be accurate!

Create a brush in the size you want to have the trigger, make sure
you have only selected this brush (press twitch escape and select
the brush again) and press N this will bring up the entity menu.

Select from the entity menu "trigger_once", then enter the following
attribute into the files and hit enter:
KEY: thread
VALUE: doLoadNextLevel

That's it, compile your map and try it
Good luck!


Illumination of the used Classes/Functions
PHP Code:
//Spawns an entity
spawn("trigger_changelevel","targetname","endLevelNow","map",""); 
This creates(spawns) a trigger of the class changeLevel,
this trigger class has the purpose to end the current game, and load the next map.
In this case the map to load is empty ["map",""], this will end the game and crash
if the server(in singleplayer) will not be instructed to load any map or disconnect.
PHP Code:
//Server only command
stuffCMD("map sangreal2"); 
In singleplayer the player is hosting his own server where his singleplayer game runs on.
So in this case it is not refereed to a multiplayer-server!
PHP Code:
//Wait for the specified amount of time.         
wait(.05); 
Does wait, comes handy to delay a action in scripting.
PHP Code:
//Trigger the specified entity
triggerEntity($endLevelNow); 
$endKLevelNow is the name of the trigger spawned before.
The $ marks this as a Entity, which is a Object in the current level,
everything what can be removed or added to the level while the game
is running is a entity, every player, every trigger, every door, every bot, movable objects, models and such.

Here is the Übertools Documentation to guide you:
Scripting Syntax
Need to know knowlage to not mess up the scripts!
Scripting Functions/classes you can make use of
4893261
Re: ST:EF2 Scriptipting, level end/map change.
Tricorder
May 18th, 2009 01:53 PM
Thread sticked. This one is definitely worth keeping. Feel free to add more stuff to it, Chriss.

Edit:
Thread unsticked and link to it added here: Elite Force Modding Tools & Tutorials
Reply

Bookmarks

Tags
end, level-scripting, nextmap, nextmission, trigger_levelchange

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SP end level polkasa SW:JK3 Modding, Mapping and Editing 8 June 20th, 2007 03:58 AM
VISTA & End of EF/EF2 seppburgh2 Elite Force 1 and 2 General Yib-Yab (Off Topic) 4 December 3rd, 2006 01:15 PM
End cutscene (EF2) *Spoiler Warning* Kwould ST:EF Problems, Errors and Help 5 December 8th, 2003 01:35 AM
End Game---EF2 Captain Piccard Elite Force 1 and 2 General Yib-Yab (Off Topic) 1 July 23rd, 2003 02:28 PM
Change level+END trigger SPY SoF Mapping, Modeling and Skinning 2 May 24th, 2003 09:45 AM


All times are GMT -7.







   
 





This site is part of the Defy Media Gaming network

The best serving of video game culture, since 2001. Whether you're looking for news, reviews, walkthroughs, or the biggest collection of PC gaming files on the planet, Game Front has you covered. We also make no illusions about gaming: it's supposed to be fun. Browse gaming galleries, humor lists, and honest, short-form reporting. Game on!

FileFront Forums - Terms of Service - Top
Copyright © 2002-2016 Game Front. All rights reserved. Powered by vBulletin®
Copyright ©2000 - 2016, vBulletin Solutions, Inc.
Forum Theme by Danny King (FileTrekker), Sheepeep & Graeme(rs)
RSS Feed Widget by FeedWind