Odamex Message Boards
Community Discussion => Technical Support => Topic started by: killingblair on February 14, 2007, 10:16:06
-
There was fairly limited information in the OdaWiki, so I'll ask here.
May I see an example of how to use a startmapscript/endmapscript with if commands to see how to correctly cycle wads and maps?
-
I have yet to use it myself, but denis (voxel) would be the best person to provide more info. He is gone for another week, but I will point him to this thread and let him to he should provide a bit more documentation and example.
In the meantime, I would suggest taking what info is there and experimenting. I highly recommend you run your server through a debugger (http://odamex.net/wiki/Debugger) and report any crashes that may occur to a new bug on the bug tracker (http://odamex.net/bugs). And of course report any useful findings here as well as updating the wiki if possible.
-
So, it will contain some ZDoom scripting or is this its own script language?
-
This is its own language. It's entirely server-side, not client-side.
-
The syntax for starmapscript is very simple:
if CVAR1 eq VALUE1 CVAR2 VALUE2
CVAR2 will be set to VALUE2 if CVAR1 is currently set to VALUE1. 'curmap' is a read-only cvar that tracks the current map, so it is a useful condition:
if curmap eq MAP01 skill 5
if curmap eq MAP02 skill 4
if curmap eq MAP30 hostname "join if you dare"
This code can be placed directly into starmapscript, or it can be put in a script, and starmapscript can be set to "exec script.cfg".
While bug 112 (http://odamex.net/bugs/show_bug.cgi?id=112) is still open, these scripts are SUBJECT TO CHANGE. Suggestions for improvement/replacement are welcome.
-
Sheds a lot of light on the subject, many thanks!
-
I made an article for it on the wiki, it probably needs some work, but its a start.
http://odamex.net/wiki/Map_scripts