Page 1 of 2
var and text
Posted: Thu Jul 21, 2005 9:07 am
by ViPER
Can i put string of text in a var?
Posted: Thu Jul 21, 2005 9:10 am
by jv_map
You mean read from a file?
Posted: Thu Jul 21, 2005 9:25 am
by ViPER
no, im making a global.scr and i want to send text to message threads,
scoreboard and hud
Posted: Thu Jul 21, 2005 10:17 am
by jv_map
You could make an array of strings...
Posted: Fri Jul 22, 2005 6:29 am
by ViPER
ok, im using the constant array like this -
local.t = this::is:

:test
iprintln local.t[1] " " local.t[2] " " local.t[3] " " local.t[4]
and it works in its own thread but how do i get it to the global.scr
I get nil nil nil nil
i tried -
local.t = this::is:

:test
setcvar testpass local.t
exec global/testing.scr
///////and in global
local.t = (int(getcvar testpass))
iprintln local.t[1] " " local.t[2] " " local.t[3] " " local.t[4]
result is nil nil nil nil
Posted: Fri Jul 22, 2005 6:38 am
by jv_map
Try
local.t = this::is:

:test
exec global/testing.scr local.t
///////and in global
main local.t:
iprintln local.t[1] " " local.t[2] " " local.t[3] " " local.t[4]
end
result is this is a test
Posted: Fri Jul 22, 2005 6:49 am
by ViPER
Cool!! TY
Posted: Sat Jul 30, 2005 10:01 am
by diego
Is this to have the console automatically print messages in the game? If so, could you give me a "Global for Dummies" version of those instructions?
I'm finally getting some custom maps on our server and I want it to regularly nag the players to download the new maps from our website.
But I've never done any server admin stuff before nor messed with any global scripting.
Posted: Sun Jul 31, 2005 1:52 am
by ViPER
make a global.scr - call it something like
myglobalstuff.scr
in all your map .scrs add this line just above the level waittil spawn
put this in myglobalstuff.scr
Code: Select all
main:
thread messages
end
messages:
while(1)
{
wait 300
iprint "get the custom map paks you big dummies they are free !"
}
end
and make sure you put this in global folder
the cool thing is when you want to add something to all your maps -
now you need just to do it once - thread it from the main.
Posted: Sun Jul 31, 2005 2:05 am
by diego
Thanks. I was hoping I wouldn't have to edit each individual map script. Can I just make copies of the original map scripts and not edit the ones in the pk3 files? Will the copies have priority over the originals?
Posted: Sun Jul 31, 2005 2:50 am
by ViPER
ive seen stock map script available for download somewhere... cant remember? anyways.. if you cant find them look in pak5.pk3 for aa.
extract the ones you want and file them like so -
maps/dm
maps/obj
global
then put them in your own pk3 and name them something like -
zzzzz-mymods.pk3
then they will load last.
Posted: Sun Jul 31, 2005 9:20 am
by lizardkid
ive seen stock map script available for download somewhere... cant remember
all stock map scripts are in the pak files, otherwise the maps wont work.
HOWEVER: i just learned today that noobux, er, linux, loads pk3 files backwards. while hopefully not many server are cursed with such an OS, you'll want to make a Linux version for the people who dont use Windows.
aaa_myModName.pk3 - Linux
zzz_myModName.pk3 - Windows
Posted: Sun Jul 31, 2005 10:09 am
by ViPER
They do work. what i mean is that someone (cant remember where) had
the scripts (unedited) all prepared in a user-pak ready to mod.
Posted: Sun Jul 31, 2005 6:33 pm
by lizardkid
i meant the server needs the scripts, clients dont need anything but the map. scripts dont need to be distributed either

Posted: Sun Jul 31, 2005 7:09 pm
by ViPER
thats correct. He wants to mod for his server.