You are missing an equals sign.
A single '=' is for assigning a value (a = 3;)
You need double equals "==" meaning, equal to (a == 3)
Unreal versus CoD2
Moderator: Core Staff
-
- Core Staff
- Posts: 13315
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: Unreal versus CoD2

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
-
- Core Staff
- Posts: 2155
- Joined: December 7th, 2004, 2:07 am
- Location: Netherlands
- Contact:
Re: Unreal versus CoD2
I have this code now but still it doesn't recognize the timeleft number;
It's probably real easy but I can't figure it out 
Code: Select all
thread time();
}
time()
{
if((level.starttime - getTime()) == 5000);
{
playsound ("5minutes");
}

-
- Core Staff
- Posts: 13315
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: Unreal versus CoD2
Going shop, will figure this out exactly when I get back...
(Will delete and repost when done)/
(Will delete and repost when done)/

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
-
- Core Staff
- Posts: 2155
- Joined: December 7th, 2004, 2:07 am
- Location: Netherlands
- Contact:
Re: Unreal versus CoD2
Ok, thx drof.
I started a new topic on this problem (so other people can search for it if they also need a script like this) so this one can be closed.
I started a new topic on this problem (so other people can search for it if they also need a script like this) so this one can be closed.
-
- Core Staff
- Posts: 13315
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: Unreal versus CoD2
Code: Select all
timePassed = (getTime() - level.startTime)/1000;
//(getTime() is counted in milliseconds, level.starttime will normally be 0 or close...
// Dividing by 1000 returns the milliseconds to seconds.
timeRemaining = (level.timeLimit * 60) - timePassed;
// timelimit is measured in minutes, multiply by 60 to get seconds
// Once we have the timelimit in seconds, we subtract the timepassed, from the timelimit.
if(timeRemaining <= 300)
//playsound
Use a default sounds first, to make sure the code is correct... then use your custom sound next...

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: Semrush [Bot] and 5 guests