classification
Moderator: Core Staff
classification
i need help...
I want to create a kind of ranking to determine who finishes first, who finishes second and who ends third
sorry for my english
I want to create a kind of ranking to determine who finishes first, who finishes second and who ends third
sorry for my english

Re: classification
OMFG, I have never seen more terrible English!
Firstly learn it - and once you know it perfectly, come to the forums with your questions. I couldn't understand what you wrote, and doubt anyone will be able to.
Firstly learn it - and once you know it perfectly, come to the forums with your questions. I couldn't understand what you wrote, and doubt anyone will be able to.
Re: classification
He wants a script that shows who finished in first, second and third place on a jumping map.megazor wrote:OMFG, I have never seen more terrible English!
Firstly learn it - and once you know it perfectly, come to the forums with your questions. I couldn't understand what you wrote, and doubt anyone will be able to.
That was not that hard to understand, i wont force anybody to learn a foreign language to ask a question with perfect grammar.

-
- Core Staff
- Posts: 2030
- Joined: July 24th, 2006, 11:21 am
- Location: Cramped in a small cubicle/making another jump map
Re: classification
Ignore megazor, he's trying to be sarcastic over the internet. You'll need a timer and to check when each player triggered your end trigger. Then give the first three players the according ranking.
Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.
Re: classification
first of all sorry 4 my englishRezil wrote:Ignore megazor, he's trying to be sarcastic over the internet. You'll need a timer and to check when each player triggered your end trigger. Then give the first three players the according ranking.
i tried to create a timer by using your script (sorry

but doesn't work >.<...yep i know i've deleted the hudelem and something else
Code: Select all
main()
{
thread start();
thread simple_stopwatch();
thread stopwatch_end();
level.time_interrupted = false;
}
start()
{
for(;;)
{
p = getentarray("self", "classname");
for(i=0;i<p.size;i++)
{
if ((!isdefined(p[i].reset)) && (isalive(p[i])))
{
p[i].reset = true;
p[i].triggered_timer = false;
p[i] thread watchselfTime();
}
}
wait 0.25;
}
}
simple_stopwatch()
{
t = getent("start_trigger","targetname");
while(1)
{
t waittill("trigger", player);
level.time_interrupted = false;
if(!self.triggered_timer)
{
level.time_interrupted = false;
player.triggered_timer = true;
if((!isdefined(player.secondwatch)) && (!isdefined(player.minutewatch)))
{
self thread make_secondswatch();
self thread make_minuteswatch();
}
}
}
}
make_secondswatch()
{
for(;;)
{
secondtime = 0;
secondtime = secondtime * 10;
seconds = 0;
for(i=seconds;i<=599;i++)
{
if(level.time_interrupted)
{
seconds = 0;
break;
}
self.secondtime = i / 10;
wait 0.1;
}
wait 0.05;
}
}
make_minuteswatch()
{
minutes = 0;
for(i=minutes;i>=0;i++)
{
if(level.time_interrupted)
{
minutes = 0;
break;
}
if(self.secondtime == 599/10) self.minutetime++;
wait 0.1;
}
}
watchselfTime()
{
for(;;)
{
if(self.triggered_timer)
{
{
level.time_interrupted = true;
self.triggered_timer = false;
self.secondtime = 0;
self.minutetime = 0;
wait 0.05;
}
}
wait 0.05;
}
}
stopwatch_end()
{
t = getent("end_trigger","targetname"); //Change!
while(1)
{
t waittill("trigger", player);
if(player.triggered_timer)
{
player.triggered_timer = false;
level.time_interrupted = true;
if ( isPlayer( player ) && isAlive( player ) && isdefined( player.done ) )
{
wait 0.5;
}
else
{
player iprintlnbold("You finished in " +self.minutetime+ " minutes and " +self.secondtime, " seconds.");
self.secondtime = 0;
self.minutetime = 0;
self.done = true;
wait 0.05;
}
}
}
}

-
- Core Staff
- Posts: 2030
- Joined: July 24th, 2006, 11:21 am
- Location: Cramped in a small cubicle/making another jump map
Re: classification
First off, if you want to use my code, you're free to do so. Second, you should've copied my script in its entirety, test it and then remove the HUD elements if you want to. You'll also have to add a variable to check which player triggered the end trigger.
Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.
Re: classification
thxRezil wrote:First off, if you want to use my code, you're free to do so

the script works now
ok but how?xDRezil wrote:You'll also have to add a variable to check which player triggered the end trigger.

-
- Core Staff
- Posts: 2030
- Joined: July 24th, 2006, 11:21 am
- Location: Cramped in a small cubicle/making another jump map
Re: classification
Remove the hud elements by finding the variables that start with newHUDElem(); or newClientHUDElem(<player>); and deleting everything related to that variable.
Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.
Re: classification
Rezil wrote:Remove the hud elements by finding the variables that start with newHUDElem(); or newClientHUDElem(<player>); and deleting everything related to that variable.
the timer works well
but i still don't understand this
Rezil wrote:You'll also have to add a variable to check which player triggered the end trigger.

Who is online
Users browsing this forum: No registered users and 1 guest