![]() |
ST:EF2 Scriptipting, level end/map change. 1 Attachment(s) 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: 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: 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: So in this case it is not refereed to a multiplayer-server! PHP Code: PHP Code: 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 |
Re: ST:EF2 Scriptipting, level end/map change. 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: http://forums.filefront.com/st-ef-mo...tutorials.html |
| All times are GMT -7. |
Powered by vBulletin®
Copyright ©2000 - 2016, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 ©2011, Crawlability, Inc.