
PeЧĐuĐe@CoDJumper.com: i'm not that great with scripting
PeЧĐuĐe@CoDJumper.com: post on the codjumper forums - drofder will know

Moderator: Core Staff
Code: Select all
function()
{
level endon ("thread_restart");
// add the rest of what you wanted here
}
Code: Select all
another_function()
{
thread function();
// Add any thing you here (maybe an if statement to restart the thread).
level notify ("thread_restart");
thread function();
}
Code: Select all
function()
{
for(;;)
{
for(;;)
{
// Add what you want in the function here
// Add an if statement to tell the loop when/why it should restart, for example.
if(level.timer < 1)
break;
wait 0.05;
}
wait 0.05;
}
}
Code: Select all
Contacts:
Xfire: shadowsniper327
Aim: sexystud323327
Msn: lethalgoa@hotmail.com
Email: Lethal@theprogamers.com
Code: Select all
RoomB()
{
level.triggerB = getent("triggerB","targetname");
while(1)
{
level.triggerB waittill("trigger", user);
if(!isDefined(user.watched) || user.watched == 0)
user thread _watched();
}
}
Code: Select all
_watched()
{
self.watched = 1;
while(self isTouching(level.triggerB))
{
wait 1;
}
self.watched = 0;
}
Code: Select all
roomA()
{
level.triggerA = getent("triggerA","targetname");
while(1)
{
level.triggerA waittill("trigger", user);
if(!isDefined(user.roomA) || user.roomA == 0)
user thread _triggerA();
}
}
Code: Select all
_triggerA()
{
self.roomA = 1;
// Message those in roomB
players = getentarray("player","classname");
for(i=0;i<players.size;i++)
{
if(isDefined(players[i].roomB))
if(players[i].roomB == 1)
players[i] iprintlnbold(self.name + "^7 has entered room A");
}
while(self istouching("level.triggerA")
{
wait 1;
}
for(i=0;i<players.size;i++)
{
if(isDefined(players[i].roomB))
if(players[i].roomB == 1)
players[i] iprintlnbold(self.name + "^7 has left room A");
}
self.roomA = 0;
}
Users browsing this forum: No registered users and 3 guests