restarting script
Moderator: Core Staff
restarting script
Hi,
just a small question
i want to let a script restart if its not done in 20 seconds.
so what function do i need to use?
just a small question
i want to let a script restart if its not done in 20 seconds.
so what function do i need to use?
-
- Core Staff
- Posts: 2214
- Joined: February 6th, 2006, 3:18 pm
- Location: Germany/Bayern
Re: restarting script
o.O so you have already a script that will be thread and works?
with notify and endon it could be possible but not sure
with notify and endon it could be possible but not sure
THAT HANDS WERE NOT TRACED!
visit my blog: Link
visit my blog: Link
Soviet wrote:Yeah, watch out, Peds will hit you with his +5 D-Battleaxe of homosexuality
-
- Core Staff
- Posts: 13315
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: restarting script
Code: Select all
mainFunction()
{
level endon ("restart_function");
thread count (20);
//Do stuff here
level notify ("restart_function");
}
count(time)
{
level endon ("restart_function");
wait time;
level notify ("restart_function");
}
loopFunctions()
{
while(1)
{
thread mainFunction();
level waittill ("restart_function");
}
}

Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
Re: restarting script
can you make a small script with it because i don't understand it.
im not really good in scripting
im not really good in scripting

Last edited by Rukariox on October 28th, 2009, 10:09 pm, edited 1 time in total.
-
- Core Staff
- Posts: 13315
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: restarting script
Well, I can't think of a good reason to use the script personally, so maybe its best you just simply say what you are trying to do exactly.

Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
Re: restarting script
i want to create a shooting game but if you don't finish you will have to start over.
-
- Core Staff
- Posts: 13315
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: restarting script
Do you mean, like a shooting gallery/target practice?
Have you scripted this shooting game yet?
My advice would be to do the following, in this order:
- Create Map detail (ignore any scripted objects)
- Plan (and write down) exactly how you want the game to work (i.e moving objects, etc)
- Create each object in the map (scripted objects).
- Create a working code for the objects (without a timer)
- Implement a reset timer
Have you scripted this shooting game yet?
My advice would be to do the following, in this order:
- Create Map detail (ignore any scripted objects)
- Plan (and write down) exactly how you want the game to work (i.e moving objects, etc)
- Create each object in the map (scripted objects).
- Create a working code for the objects (without a timer)
- Implement a reset timer

Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
Who is online
Users browsing this forum: No registered users and 10 guests