AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   glow color change in time (https://forums.alliedmods.net/showthread.php?t=224603)

GhostMan 08-26-2013 08:49

glow color change in time
 
I have option in vip plugin which makes you glow in one random color

PHP Code:

case 3:
{
    new 
p_randomnum random_num(0255)
    
    
set_user_rendering(idkRenderFxGlowShellp_randomnump_randomnump_randomnumkRenderNormal25)


what i would like is that when this option is selected it would make you glow not in one specific color but that color would change in time.

What could be the ways to do that?

~Ice*shOt 08-26-2013 08:56

Re: glow color change in time
 
set_task?

GhostMan 08-26-2013 15:12

Re: glow color change in time
 
Example would be nice.

~Ice*shOt 08-26-2013 15:22

Re: glow color change in time
 
Something like this

PHP Code:

#define TaskID_RandomGlow 14224

case 3set_task(0.1"Task_RandomGlow"id TaskID_RandomGlow)

public 
Task_RandomGlow(id)
{
    
id -= TaskID_RandomGlow

    
new Random random_num(0255)

    
set_user_rendering(idkRenderFxGlowShellRandomRandomRandomkRenderNormal25)

    
set_task(10.0"Task_RandomGlow"id TaskID_RandomGlow// Time to change glow: 10 seconds


And dont forget to remove:

PHP Code:

remove_task(id TaskID_RandomGlow


Moshiko014 08-26-2013 15:23

Re: glow color change in time
 
PHP Code:

case 3

    new 
p_randomnum random_num(0255
     
    
set_user_rendering(idkRenderFxGlowShellp_randomnump_randomnump_randomnumkRenderNormal25
    
set_task(5.0"ChangeGlowColor"id+4444)
}
----------------------------------
public 
ChangeGlowColor(id) {
    
id -= 4444;
    new 
p_randomnum random_num(0255
     
    
set_user_rendering(idkRenderFxGlowShellp_randomnump_randomnump_randomnumkRenderNormal25


This would change the glow color after 5.0 seconds to another random color
My example would change it only once tho


All times are GMT -4. The time now is 18:58.

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