AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   set_lights loop once (https://forums.alliedmods.net/showthread.php?t=92978)

Hunter-Digital 05-22-2009 19:36

set_lights loop once
 
I recently noticed that if you use more letters in set_lights() you'll get a sequence... but it's looped, and I have to set a task to clear it, how can I clear it without a task ? :?

PHP Code:

public func()
{
        
set_lights("zazahhhhhh")
        
set_task(0.25"clear")
}
 
public 
clear() set_lights("h"

(example of what I have)

Emp` 05-22-2009 21:16

Re: set_lights loop once
 
I'm pretty sure that is what you will have to do.

Dr.G 05-22-2009 21:53

Re: set_lights loop once
 
if you need a delay do like that, else just call the function right away...

Hunter-Digital 05-22-2009 22:36

Re: set_lights loop once
 
I also tried:
PHP Code:

set_lights("zazahhhhhh")
set_lights("h"

but doesn't work, keeps the "m" light
And I even looked into it's source but I can't understand much...

So there's no way around set_task() on this one ?

Bugsy 05-23-2009 00:13

Re: set_lights loop once
 
What exactly are you trying to accomplish with set_lights()?

"zazahhhhh"
"zazahhhhh" then stay at "h"
"zaza" then stay at "h"

Hunter-Digital 05-23-2009 00:31

Re: set_lights loop once
 
"zaza" then stay at "h"

I placed the extra H's there in case of lag or something so that it doesn't loop again, it's like a waiting sequence for the task :P

Do you know any workaround of that task ? :?

PS: "zaza" are just example values :}


All times are GMT -4. The time now is 01:34.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.