Raised This Month: $51 Target: $400
 12% 

Blockmaker - How to use less actions in your bm


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
lazarev
Veteran Member
Join Date: Sep 2008
Old 03-04-2010 , 05:59   Blockmaker - How to use less actions in your bm
Reply With Quote #1

Hello,
Here I will show you, how to make normal/low/high trampoline with one action instead of three different
Here is the action:
PHP Code:
actionTrampoline(idFloat:Velo)
{
    
//if trampoline timeout has exceeded (needed to prevent velocity being given multiple times)
    
if (halflife_time() >= gfTrampolineTimeout[id])
    {
        new 
Float:velocity[3];
        
        
//set player Z velocity to make player bounce
        
entity_get_vector(idEV_VEC_velocityvelocity);
        
velocity[2] = Velo;    
        
entity_set_vector(idEV_VEC_velocityvelocity);
        
        
entity_set_int(idEV_INT_gaitsequence6);           //play the Jump Animation
        
        
gfTrampolineTimeout[id] = halflife_time() + 0.5;
    }

Velo = speed of trampoline.

So, we will have something like this:
PHP Code:
    case BM_TRAMPOLINEactionTrampoline(id500.0);
    case 
BM_LOWTRAMPOLINEactionTrampoline(id250.0);
    case 
BM_HIGHTRAMPOLINEactionTrampoline(id750.0); 
Tell me if you want more examples, oki?

Last edited by lazarev; 03-30-2010 at 13:59.
lazarev is offline
JaGareN
Senior Member
Join Date: Mar 2009
Old 03-04-2010 , 15:56   Re: Blockmaker - How to use one action for blocks like normal/high/low trampoline
Reply With Quote #2

Quote:
Originally Posted by lazarev View Post

So, we will have something like this:
PHP Code:
    case BM_TRAMPOLINEactionTrampoline(id500.0);
    case 
BM_LOWTRAMPOLINEactionTrampoline(id250.0);
    case 
BM_HIGHTRAMPOLINEactionTrampoline(id750.0); 
Tell me if you want more examples, oki?

You should explain where they have to put those. Let me guess... under client_prethink?
JaGareN is offline
lazarev
Veteran Member
Join Date: Sep 2008
Old 03-05-2010 , 04:22   Re: Blockmaker - How to use one action for blocks like normal/high/low trampoline
Reply With Quote #3

sure.
lazarev is offline
lazarev
Veteran Member
Join Date: Sep 2008
Old 03-06-2010 , 03:40   Re: Blockmaker - How to use one action for blocks like normal/high/low trampoline
Reply With Quote #4

Money & Super money in one.
PHP Code:
    case BM_MONEYactionMoney(idfalse5000);
    case 
BM_SUPERMONEYactionMoney(idfalse9000); 
PHP Code:
actionMoney(idOverrideTimer, const givemoney)
{
    new 
Float:fTime halflife_time();
    
    
//make sure player is alive
    
if (fTime >= gfMoneyNextUse[id] || OverrideTimer)
    {
            new 
money cs_get_user_money(id);
            if( 
money 16000 )
            {
                if( 
money >= (16000 givemoney) )    
                {
                    
cs_set_user_money(id16000);
                }
                else     
                {
                    
cs_set_user_money(idmoney givemoney);
                }
                
gfMoneyNextUse[id] = fTime get_cvar_float("bm_moneycooldown");
            }
        }
    }


Last edited by lazarev; 03-06-2010 at 04:14.
lazarev is offline
fredde123321
Junior Member
Join Date: Mar 2010
Old 03-22-2010 , 17:31   Re: Blockmaker - How to use one action for blocks like normal/high/low trampoline
Reply With Quote #5

Thanks, very useful
fredde123321 is offline
lazarev
Veteran Member
Join Date: Sep 2008
Old 03-30-2010 , 13:46   Re: Blockmaker - How to use one action for blocks like normal/high/low trampoline
Reply With Quote #6

grenade blocks:
PHP Code:
case BM_HEactionGrenade(idCSW_HEGRENADE);
case 
BM_FROSTactionGrenade(idCSW_SMOKEGRENADE);
case 
BM_FLASHactionGrenade(idCSW_FLASHBANG); 
PHP Code:
actionGrenade(idGrenadeType)
{
    
//get game time
    
new Float:fTime halflife_time();
        
    if (
cs_get_user_team id ) == CS_TEAM_T)
    {
        switch( 
GrenadeType )
        {
            case 
CSW_FLASHBANG:
            {
                if(
fTime >= gfFlashNextUse[id])
                {
                    
give_item(id"weapon_flashbang");
                    
gfFlashNextUse[id] = fTime get_cvar_float("bm_flashcooldown"); 
                }
            }
            case 
CSW_HEGRENADE:
            {
                if(
fTime >= gfHENextUse[id ])
                {
                    
give_item(id"weapon_hegrenade");
                    
gfHENextUse[id] = fTime get_cvar_float("bm_hecooldown"); 
                }
            }
            case 
CSW_SMOKEGRENADE:
            {
                if(
fTime >= gfFrostNextUse[id])
                {
                    
give_item(id"weapon_smokegrenade");
                    
gfFrostNextUse[id] = fTime get_cvar_float("bm_frostcooldown");
                }
            }
        }
    }

lazarev is offline
r14170
Veteran Member
Join Date: Dec 2009
Old 04-06-2010 , 08:26   Re: Blockmaker - How to use less actions in your bm
Reply With Quote #7

asdasd

Last edited by r14170; 08-12-2011 at 11:23.
r14170 is offline
r14170
Veteran Member
Join Date: Dec 2009
Old 04-06-2010 , 08:40   Re: Blockmaker - How to use less actions in your bm
Reply With Quote #8

adsvfds

Last edited by r14170; 08-12-2011 at 11:23.
r14170 is offline
kielor
Senior Member
Join Date: Jan 2009
Location: Russia, Novosibirsk
Old 04-07-2010 , 06:27   Re: Blockmaker - How to use less actions in your bm
Reply With Quote #9

cool story bro

GJ, actually this article will be very useful for noobs that always want some new multisuperpuperdrooper blocks supermega privately for their servers
__________________
try using +karma if i helped you...
kielor is offline
Send a message via ICQ to kielor Send a message via Skype™ to kielor
lazarev
Veteran Member
Join Date: Sep 2008
Old 04-07-2010 , 13:06   Re: Blockmaker - How to use less actions in your bm
Reply With Quote #10

Quote:
Originally Posted by kielor View Post
cool story bro

GJ, actually this article will be very useful for noobs that always want some new multisuperpuperdrooper blocks supermega privately for their servers
thanks bro, pwol nahui s temi, bro.

Last edited by lazarev; 04-07-2010 at 13:08.
lazarev is offline
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 18:25.


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