![]() |
#1 |
How do I end a level?
I almost finished the level I'm making, and I said almost because I don't know how to proceed for the last and final thing: the end of the level. I suppose it must be triggered, so I need to put a trigger_once where I want my level to end... but what does this trigger have to do? Call a script function? (which contains... what?) Target something? (what?)
EDIT: I found the answer to the question above. A trigger_once must target a target_endlevel. And what's the difference between loading the next level and returning to the main menu? If I want to load another level I insert the level name as the value for the key "nextMap", but what if I want to return to the main menu? Oh, and another thing. I want the name of the level to show up in the loading screen, how do I do that?
__________________
[...] We view customers as complete morons that will never catch on and [...] we're lying to them all the time. (Gabe Newell, Valve) I'm the worst enemy in film-making and a completely talentless idiot. (Uwe Boll) Faith is why you are wrong. (Crosma)
Last edited by Altered Reality; 10-13-2007 at 02:23 PM.
|
|
![]() |
![]() |
#2 |
Re: How do I end a level?
Don't know hw to return to mainmenu, but I know how to show the map name. Here the explanation:
You have to create a maps.def on the def folder of your mod, and enter the info of the map in there, for example: Code:
mapDef yourmap_path { "name" "#str_xxxxx" "devname" "devmapname" "singleplayer" "1" "size0" "0" "size1" "0" "size2" "0" "size3" "0" "snd_loadmusic" "yoursound" } on the "name" line you can add a string calling the name or you can just write the name you want without the "#". On "devname" you can put the name you want for load the map by console "snd_loadmusic" play a sound during the level loading, is referred to a sound shader, if you don't want to load a sound just delete the line. the "size 0,1,2,3" are for the progress loading bar, just put the size of your maps in bytes, or you can leave these to 0.
Last edited by Neurological; 12-09-2007 at 11:18 AM.
|
|
![]() |
![]() |
#3 |
Re: How do I end a level?
Thanks, it may come in handy for the next episodes, but it has some issues:
1) when I load a level which is specified in the maps.def file, the loading bar always remains empty 2) when I load a level which is NOT specified in the maps.def file, Prey CRASHES! By the way, it turned out I didn't really need to know how to return to the main menu: I just ended the level the standard way (=triggering the load of the eventual next level), and if a level of that name does not exist, the game will return to the main menu. If I use the name I plan to use for the next episode, I'll have nothing to change when I release the next episode, and people will be able to play one episode after another without loading each map separately.
__________________
[...] We view customers as complete morons that will never catch on and [...] we're lying to them all the time. (Gabe Newell, Valve) I'm the worst enemy in film-making and a completely talentless idiot. (Uwe Boll) Faith is why you are wrong. (Crosma)
Last edited by Altered Reality; 12-09-2007 at 04:29 PM.
|
|
![]() |
![]() |
#4 |
Re: How do I end a level?
1) try to put the file size on the def. Run prey, open your mod and type this command in the console:
Code:
com_updateLoadSize 1 Then run your map, the maps.def should update itself. 2)Don't know why this happen, maybe after creating the def, the game demand it for others maps.
Last edited by Neurological; 12-09-2007 at 05:25 PM.
|
|
![]() |
Bookmarks |
|
|