What I would like to do....
Posted: Sun Aug 01, 2004 6:39 am
... is at the beginning of each round and when the first time the map loads, to have the screen go to black, freeze all the players, print a message in the center, and then bring the map into view and release all the players to battle it out. This is for a multiplayer server side mod. I know the commands to black out the screen and bring it back. I know the command for printing a message in the center of the screen. What has me confused is, how to freeze and then release the player, and where in the map.scr these commands should be executed. Here is what I have now and it seems like it works except the player doesnt freeze. Can still walk around in the dark. Now I only have the ability to test locally. I want this to work on a dedicated server. The way I test is type restart in the console.
Script:
main:
// the usual info is here
level waittill prespawn
level waittill spawn
thread target_everyone
wait 5 // put this here to hopefully wait for all players to load the map
local.player freezeplayer // is this right ? Doesn't seem to do a thing
fadeout 0.1 0 0 0 1
huddraw_alpha 100 0 // this and previous line work just fine
exec global/message_print.scr::message level.msg NIL 5 // this message works just fine - not a problem
wait 3.5 // added this to keep screen black while the message prints
fadein 2 0 0 0 1 // works just fine
local.player releaseplayer // well since I'm not frozen this line isn't doing a thing
level waittill roundstart
//rest of map script follows here
end
The thread for target_everyone:
target_everyone:
while (1)
{
for(local.i = 1; local.i <= $player.size; local.i++)
{
local.player = $player[local.i]
waitframe
}
waitframe
}
end
In the console I get the error 'freezeplayer applied to NIL'
Can anyone help me out?
G3mInI
Script:
main:
// the usual info is here
level waittill prespawn
level waittill spawn
thread target_everyone
wait 5 // put this here to hopefully wait for all players to load the map
local.player freezeplayer // is this right ? Doesn't seem to do a thing
fadeout 0.1 0 0 0 1
huddraw_alpha 100 0 // this and previous line work just fine
exec global/message_print.scr::message level.msg NIL 5 // this message works just fine - not a problem
wait 3.5 // added this to keep screen black while the message prints
fadein 2 0 0 0 1 // works just fine
local.player releaseplayer // well since I'm not frozen this line isn't doing a thing
level waittill roundstart
//rest of map script follows here
end
The thread for target_everyone:
target_everyone:
while (1)
{
for(local.i = 1; local.i <= $player.size; local.i++)
{
local.player = $player[local.i]
waitframe
}
waitframe
}
end
In the console I get the error 'freezeplayer applied to NIL'
Can anyone help me out?
G3mInI