Page 1 of 1
$player in a global file?
Posted: Fri Oct 30, 2009 7:56 pm
by SA007
I'm (still) doing some mods and I'm busy with some stuff that needs to work for all levels, so in some global script.
There is just a problem, when I try to use $player in that script (for example DMprecache.scr) it goes horribly wrong.
Is it possible to use $player (or something else that lets me scan trough all the players) outside the map script?
Posted: Sat Oct 31, 2009 3:55 am
by Tazz
u should be able to make ur own script and exec it in the map script....i wouldnt try to put it in the dmprecache but make ur own then exec it in the maps scripts u want......that how alot of fixes work without having to mod all the maps...just put exec global/urscriptname.scr and there ya go
hope this helps ya
Posted: Sat Oct 31, 2009 10:55 am
by SA007
I tried DMprecache and my own script, but that didn't work.
Apperantly $player can only be used after waittill spawn.
Makes sense, but DMprecache is before that and you can't use waittill spawn anywhere else than the mapscript.
So, i moved my script to after waittill spawn (just an exec) and it worked fine
Now I can finaly make changes to that in 1 place in stead of every map

Posted: Fri Nov 06, 2009 10:40 pm
by Tazz
well glad ya got going buddy......so u have t6o put the exec global/urfixname.scr after waittill spawn????? or ur script???
cuz i just meant make a script and put in global folder....then exec it from map script...but all ur fixes would be in the script in global file...but if u got it going then forget what i said lol