Hi Guys, i have a question: how i can make that a player can't move for (example) 20 seconds?
after the 20 seconds he can move?
If you ask what i want to make:
The Map is starting, 20 seconds and the game begins
Hi Guys, i have a question: how i can make that a player can't move for (example) 20 seconds?
after the 20 seconds he can move?
If you ask what i want to make:
The Map is starting, 20 seconds and the game begins
link player to script origin:
To lock:
org = spawn("script_origin",self.origin);
self linkTo(org);
To unlock:
self unlink();
kung foo man (15th June 2013)
So you mean: [code]
org = spawn("script_origin",self.origin);
self linkTo(org);
wait(20);
self unlink();
But don't forget to delete the helper-model then. On the other hand you don't need a model for each player, one model for all works also.
PHP Code:
// ONLY ONCE:
level.helper = spawn("script_origin", (0,0,0))
// for each player:
player linkTo(level.helper);
wait 20;
player unlink();
timescale 0.01
Hi, this i get it if i have test it:
script:Code:******* script compile error ******* bad syntax: (file 'maps/mp/gametypes/_begin.gsc', line 9) self linkTo(level.waiter); * ************************************
Code:init() { thread waiting(); } waiting() { level.waiter = spawn("script_origin", (0,0,0)) self linkTo(level.waiter); wait 20; self unlink(); }
I said with bold text: ONLY ONCE
If you can't understand that, use:
PHP Code:
init()
{
thread waiting();
}
waiting()
{
if ( ! isDefined(level.waiter))
level.waiter = spawn("script_origin", (0,0,0)); // you forget the ; here
self linkTo(level.waiter);
wait 20;
self unlink();
}
timescale 0.01
hmm it didnt work, i have try to make script_model but it doesnt work too.
my error:
Code:******* script runtime error ******* struct is not an entity: (file 'maps/mp/gametypes/_begin.gsc', line 10) self linkTo(level.waiter); *
You need to call the functions on a player, now the functions work with "level".
timescale 0.01
hmmm idk what you mean ;(
Try freezecontrols() instead.