i have sort of a global script file (called "c_script") that i put in my wad as a text entry. i use the #include command to access it in all of my maps. it is triggered via a "actor enters sector" thing and works just fine. the script basically teleports me into a random map:
it should execute whenever i enter a map and display a hud message. but it simply won't work. it doesn't put out an error either. it works when i put this code into the individual maps script, but i'd have to repeat this for every map which i really want to avoid if possible.
Question
zzzornbringer
i have sort of a global script file (called "c_script") that i put in my wad as a text entry. i use the #include command to access it in all of my maps. it is triggered via a "actor enters sector" thing and works just fine. the script basically teleports me into a random map:
script 80 (void) { int levelinfo = GetLevelInfo(LEVELINFO_LEVELNUM); int random_map; while(true) { random_map=random(1,6); if(random_map != levelinfo) { Teleport_NewMap(random_map,0,0); } delay(1); } }
works perfectly fine.
now i added another script into this file:
script 81 enter { while(true) { HudMessage(s:"You have ", i:CheckInventory("spacebucks"), s:" spacebucks"; HUDMSG_PLAIN, 0, CR_GREEN, 0.0 , 0.1, 0.1); delay(35/10); } }
it should execute whenever i enter a map and display a hud message. but it simply won't work. it doesn't put out an error either. it works when i put this code into the individual maps script, but i'd have to repeat this for every map which i really want to avoid if possible.
Share this post
Link to post
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.