Raised This Month: $ Target: $400
 0% 

Adding a glowing efect


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
StormZone
BANNED
Join Date: Nov 2008
Location: [RO]Hunedoara/Petrosani
Old 10-07-2009 , 07:14   Adding a glowing efect
Reply With Quote #1

Heloo again.
So this is a part of an ultimate form uwc3,wath i want to do is to make the one ho uses this to glow as long as the ultimate is active.
The glowing should be yelow or gold.
Y tried some methods but not glowing.Y would realy apreciate if someone should show me how to make this.

PHP Code:
/* VooDoo */
public Ult_VooDoo id )
{

    if ( !
Ult_Can_Use idSKILLIDX_VOODOO) )
    {
        return 
PLUGIN_HANDLED;
    }

    if ( !
ultimateused[id] )
    {
        new 
parm[2];
        
parm[0] = id;
        
parm[1] = 3;

        
godshealth[id] = get_user_health id );
        
hasgodmode[id] = true;

        
set_user_health_log idget_user_health id ) + 2048 );

        new 
Float:fTime 5.0;
        new 
iByte 4;

        if ( 
USE_ENH && ( p_attribs[id][ATTRIBIDX_INT] >= INT_MASTER_LEVEL ) )
        {
            
iByte 4;
            
fTime 5.0;
        }
        else
        {
            
fTime 3.0;
            
iByte 2;
        }

        
set_task fTime"Task_Reset_Godmode"TASK_RESET_GODMODE idparm);

        if( 
Util_Should_Msg_Client(id) )
        {
            
message_begin MSG_ONE108, { 00}, id );

            
// Bar ( thanks to bad-at-this )
            // duration
            
write_byte iByte );

            
// duration
            
write_byte );

            
message_end ( );
        }

        if( 
Util_Should_Msg_Client_Aliveid ) )
        {
            if ( 
file_exists "sound/warcraft3/divineshield.wav" ) == )
            {
                
emit_sound idCHAN_STATIC"warcraft3/divineshield.wav"1.0ATTN_NORM0PITCH_NORM );
            }
        }

        
ultimateused[id] = true;
        
icon_controller id );
    }

    return 
PLUGIN_HANDLED;


StormZone is offline
Send a message via Yahoo to StormZone Send a message via Skype™ to StormZone
tolsty
Senior Member
Join Date: Feb 2008
Location: Latvia
Old 10-07-2009 , 08:38   Re: Adding a glowing efect
Reply With Quote #2

post full plugin sourcecode
__________________
[IMG]http://img2.**************/img2/7173/signfp.jpg[/IMG]
tolsty is offline
StormZone
BANNED
Join Date: Nov 2008
Location: [RO]Hunedoara/Petrosani
Old 10-07-2009 , 12:55   Re: Adding a glowing efect
Reply With Quote #3

There are more files.
It uwc3 1.7.55
wich ones do you want?
StormZone is offline
Send a message via Yahoo to StormZone Send a message via Skype™ to StormZone
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-07-2009 , 13:02   Re: Adding a glowing efect
Reply With Quote #4

What did you try?
__________________
Arkshine is offline
StormZone
BANNED
Join Date: Nov 2008
Location: [RO]Hunedoara/Petrosani
Old 10-07-2009 , 16:06   Re: Adding a glowing efect
Reply With Quote #5

This is a part of the Shadow Hunter from war3ft(has the voodoo ultimate) and in this version it glous.
PHP Code:
// ****************************************
// Shadow Hunter's Big Bad Voodoo
// ****************************************

public SH_Ult_BigBadVoodooid )
{
    if ( !
p_data_b[id][PB_ISCONNECTED] )
    {
        return;
    }

    
p_data_b[id][PB_GODMODE] = true;

    
p_data_b[id][PB_CAN_RENDER] = false;

    
ULT_ResetCooldownidget_pcvar_numCVAR_wc3_ult_cooldown ) + SH_BIGBADVOODOO_DURATIONfalse );

    
ULT_IconidICON_FLASH );
    
    if ( 
g_MOD == GAME_CSTRIKE || g_MOD == GAME_CZERO )
    {
        
Create_BarTimeidSH_BIGBADVOODOO_DURATION);
    }
        
    
emit_soundidCHAN_STATICg_szSounds[SOUND_VOODOO], 1.0ATTN_NORM0PITCH_NORM );

    
set_user_renderingidkRenderFxGlowShell25524550kRenderNormal16 );

    new 
vOrigin[3];
    
get_user_originidvOrigin );
    
vOrigin[2] += 75;

    
Create_TE_ELIGHTidvOrigin100255245200SH_BIGBADVOODOO_DURATION);

    
set_taskfloatSH_BIGBADVOODOO_DURATION ), "SH_Ult_Remove"TASK_RESETGOD id );

    return;

it think this is the glowing task but dont know how to make it for uwc3 mode.

PHP Code:
   Create_TE_ELIGHTidvOrigin100255245200SH_BIGBADVOODOO_DURATION);

    
set_taskfloatSH_BIGBADVOODOO_DURATION ), "SH_Ult_Remove"TASK_RESETGOD id ); 
StormZone is offline
Send a message via Yahoo to StormZone Send a message via Skype™ to StormZone
tolsty
Senior Member
Join Date: Feb 2008
Location: Latvia
Old 10-07-2009 , 17:42   Re: Adding a glowing efect
Reply With Quote #6

1)this is to set glow:
set_user_rendering( id, kRenderFxGlowShell, 255, 245, 50, kRenderNormal, 16 );
2)this to remove it:
set_user_rendering( id, kRenderFxGlowShell, 0, 0, 0, kRenderNormal, 16 );

Set the glow in the ultimate function after emit_sound, and find a function like Task_Reset_Godmode or whatever, this is the line how to recognize where the ultimate is removed
set_task ( fTime,"Task_Reset_Godmode", TASK_RESET_GODMODE + id, parm, 2 );

and in that function remove the glow.
__________________
[IMG]http://img2.**************/img2/7173/signfp.jpg[/IMG]

Last edited by tolsty; 10-07-2009 at 17:44.
tolsty is offline
StormZone
BANNED
Join Date: Nov 2008
Location: [RO]Hunedoara/Petrosani
Old 10-07-2009 , 21:00   Re: Adding a glowing efect
Reply With Quote #7

Here is how y did it?
PHP Code:
/* VooDoo */
public Ult_VooDoo id )
{

    if ( !
Ult_Can_Use idSKILLIDX_VOODOO) )
    {
        return 
PLUGIN_HANDLED;
    }

    if ( !
ultimateused[id] )
    {
        new 
parm[2];
        
parm[0] = id;
        
parm[1] = 3;

        
godshealth[id] = get_user_health id );
        
hasgodmode[id] = true;

        
set_user_health_log idget_user_health id ) + 2048 );

        new 
Float:fTime 5.0;
        new 
iByte 4;

        if ( 
USE_ENH && ( p_attribs[id][ATTRIBIDX_INT] >= INT_MASTER_LEVEL ) )
        {
            
iByte 4;
            
fTime 5.0;
        }
        else
        {
            
fTime 3.0;
            
iByte 2;
        }

        
set_task fTime"Task_Reset_Godmode"TASK_RESET_GODMODE idparm);
        
set_user_renderingidkRenderFxGlowShell000kRenderNormal16 );

        if( 
Util_Should_Msg_Client(id) )
        {
            
message_begin MSG_ONE108, { 00}, id );

            
// Bar ( thanks to bad-at-this )
            // duration
            
write_byte iByte );

            
// duration
            
write_byte );

            
message_end ( );
        }

        if( 
Util_Should_Msg_Client_Aliveid ) )
        {
            if ( 
file_exists "sound/warcraft3/divineshield.wav" ) == )
            {
                
emit_sound idCHAN_STATIC"warcraft3/divineshield.wav"1.0ATTN_NORM0PITCH_NORM );
                
set_user_renderingidkRenderFxGlowShell25524550kRenderNormal16 );
            }
        }

        
ultimateused[id] = true;
        
icon_controller id );
    }

    return 
PLUGIN_HANDLED;


The glowing works but the problem is that is not desepearing on the ultimate time over and when you shot or switch weapon.Did y placed the set_.. rong?
StormZone is offline
Send a message via Yahoo to StormZone Send a message via Skype™ to StormZone
tolsty
Senior Member
Join Date: Feb 2008
Location: Latvia
Old 10-08-2009 , 02:33   Re: Adding a glowing efect
Reply With Quote #8

you dont have to set the glow 2 times in a function

in this case remove
PHP Code:
 if( Util_Should_Msg_Client_Aliveid ) )
        {
            if ( 
file_exists "sound/warcraft3/divineshield.wav" ) == )
            {
                
emit_sound idCHAN_STATIC"warcraft3/divineshield.wav"1.0ATTN_NORM0PITCH_NORM );
                
// remove me !set_user_rendering( id, kRenderFxGlowShell, 255, 245, 50, kRenderNormal, 16 );
            
}
        } 
its already is set here
PHP Code:
        }

        
set_task fTime"Task_Reset_Godmode"TASK_RESET_GODMODE idparm);
        
set_user_renderingidkRenderFxGlowShell000kRenderNormal16 );

        if( 
Util_Should_Msg_Client(id) )
        { 
and find somewhere in the code "public Task_Reset_Godmode(playerid)"
in this funtion remove the glow, to remove it add this line
set_user_rendering( id, kRenderFxGlowShell, 0, 0, 0, kRenderNormal, 16 );

and search for lines like:
remove_task(TASK_RESET_GODMODE + id)
TASK_RESET_GODMODE( id )
, before those remove the glow

__________________
[IMG]http://img2.**************/img2/7173/signfp.jpg[/IMG]

Last edited by tolsty; 10-08-2009 at 02:42.
tolsty is offline
StormZone
BANNED
Join Date: Nov 2008
Location: [RO]Hunedoara/Petrosani
Old 10-08-2009 , 04:17   Re: Adding a glowing efect
Reply With Quote #9

So here it how y did it.
This is the code from ultimates.inl (the file where the ultimates functions are stored)

PHP Code:
/* VooDoo */
public Ult_VooDoo id )
{

    if ( !
Ult_Can_Use idSKILLIDX_VOODOO) )
    {
        return 
PLUGIN_HANDLED;
    }

    if ( !
ultimateused[id] )
    {
        new 
parm[2];
        
parm[0] = id;
        
parm[1] = 3;

        
godshealth[id] = get_user_health id );
        
hasgodmode[id] = true;

        
set_user_health_log idget_user_health id ) + 2048 );

        new 
Float:fTime 5.0;
        new 
iByte 4;

        if ( 
USE_ENH && ( p_attribs[id][ATTRIBIDX_INT] >= INT_MASTER_LEVEL ) )
        {
            
iByte 4;
            
fTime 5.0;
        }
        else
        {
            
fTime 3.0;
            
iByte 2;
        }

        
set_task fTime"Task_Reset_Godmode"TASK_RESET_GODMODE idparm);

        if( 
Util_Should_Msg_Client(id) )
        {
            
message_begin MSG_ONE108, { 00}, id );

            
// Bar ( thanks to bad-at-this )
            // duration
            
write_byte iByte );

            
// duration
            
write_byte );

            
message_end ( );
        }

        if( 
Util_Should_Msg_Client_Aliveid ) )
        {
            if ( 
file_exists "sound/warcraft3/divineshield.wav" ) == )
            {
                
emit_sound idCHAN_STATIC"warcraft3/divineshield.wav"1.0ATTN_NORM0PITCH_NORM );
                
set_user_renderingidkRenderFxGlowShell25524550kRenderNormal16 );
            }
        }

        
ultimateused[id] = true;
        
icon_controller id );
    }

    return 
PLUGIN_HANDLED;


and this to task.inl (where the tasks are stored)
PHP Code:
/* voodoo */
public Task_Reset_Godmode parm[] )
{
    new 
id parm[0];

    new 
name[32];
    
get_user_name idname31 );

    if ( 
godshealth[id] < )
    {
        
set_user_health_log id30 );
    }
    else
    {
        
set_user_health_log idgodshealth[id] );
    }

    
hasgodmode[id] = false;

    
set_task CVAR_VOODOO_COOLDOWN"cooldown"TASK_COOLDOWN_RESET idparm);
    
set_user_renderingidkRenderFxGlowShell000kRenderNormal16 );

    if( 
Util_Should_Msg_Client(id) )
    {
        
set_hudmessage 010000.050.7520.0210.00.010.1);
        
show_hudmessage id"Your Voodoo has expired" );
    }

    
icon_controller id );

    return 
PLUGIN_CONTINUE;

Now it works.The glowing apears and disapears after the voodoo is gone but when in voodoo mode if y shot or switch weapon or enithing else besides moving and jumping it disapears.
Why?
StormZone is offline
Send a message via Yahoo to StormZone Send a message via Skype™ to StormZone
StormZone
BANNED
Join Date: Nov 2008
Location: [RO]Hunedoara/Petrosani
Old 10-08-2009 , 11:21   Re: Adding a glowing efect
Reply With Quote #10

Some help plese.It almost done but how do y fix that?
StormZone is offline
Send a message via Yahoo to StormZone Send a message via Skype™ to StormZone
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 22:39.


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