Raised This Month: $32 Target: $400
 8% 

Blockmaker - Removing Original Trampoline Skin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
GXLZPGX
Veteran Member
Join Date: Sep 2009
Old 12-22-2009 , 23:56   Blockmaker - Removing Original Trampoline Skin
Reply With Quote #1

Want to give the trampoline your own skin? That damn mother fucking piece of shit sprite getting in the way? (The flashing thingy)
Well, its very simple to remove it! Follow these easy steps!

Search for:

PHP Code:
new const gszBlockModelDefault[] = "models/blockmaker/bm_block_default.mdl";
new const 
gszBlockModelPlatform[] = "models/blockmaker/bm_block_platform.mdl";
new const 
gszBlockModelBhop[] = "models/blockmaker/bm_block_bhop.mdl";
new const 
gszBlockModelDamage[] = "models/blockmaker/bm_block_damage.mdl";
new const 
gszBlockModelHealer[] = "models/blockmaker/bm_block_healer.mdl";
new const 
gszBlockModelInvincibility[] = "models/blockmaker/bm_block_invincibility.mdl";
new const 
gszBlockModelStealth[] = "models/blockmaker/bm_block_stealth.mdl";
new const 
gszBlockModelSpeedBoost[] = "models/blockmaker/bm_block_speedboost.mdl";
new const 
gszBlockModelNoFallDamage[] = "models/blockmaker/bm_block_nofalldamage.mdl";
new const 
gszBlockModelIce[] = "models/blockmaker/bm_block_ice.mdl";
new const 
gszBlockModelTrampoline[] = "models/blockmaker/bm_block_default.mdl";
new const 
gszBlockModelDeath[] = "models/blockmaker/bm_block_death.mdl";
new const 
gszBlockModelNuke[] = "models/blockmaker/bm_block_nuke.mdl";
new const 
gszBlockModelCamouflage[] = "models/blockmaker/bm_block_camouflage.mdl";
new const 
gszBlockModelLowGravity[] = "models/blockmaker/bm_block_lowgravity.mdl";
new const 
gszBlockModelFire[] = "models/blockmaker/bm_block_fire.mdl";
new const 
gszBlockModelRandom[] = "models/blockmaker/bm_block_random.mdl";
new const 
gszBlockModelSlap[] = "models/blockmaker/bm_block_slap.mdl";
new const 
gszBlockModelHoney[] = "models/blockmaker/bm_block_honey.mdl";
new const 
gszBlockModelBarrierCT[] = "models/blockmaker/bm_block_barrier_ct.mdl";
new const 
gszBlockModelBarrierT[] = "models/blockmaker/bm_block_barrier_t.mdl";
new const 
gszBlockModelBootsOfSpeed[] = "models/blockmaker/bm_block_bootsofspeed.mdl";
new const 
gszBlockModelGlass[] = "models/blockmaker/bm_block_glass.mdl";
new const 
gszBlockModelBhopNoSlow[] = "models/blockmaker/bm_block_bhop_noslow.mdl";
new const 
gszBlockModelAutoBhop[] = "models/blockmaker/bm_block_autobhop.mdl"
I added the Trampoline in between ice and death. You can change the skin of course.

Search for:

PHP Code:
// block sprites
new const gszBlockSpriteFire[] = "sprites/blockmaker/bm_block_fire.spr";                //custom
new const gszBlockSpriteFireSmall[] = "sprites/blockmaker/bm_block_fire_small.spr";        //custom
new const gszBlockSpriteFireLarge[] = "sprites/blockmaker/bm_block_fire_large.spr";        //custom
new const gszBlockSpriteTrampoline[] = "sprites/blockmaker/bm_block_trampoline.spr";        //custom
new const gszBlockSpriteTrampolineSmall[] = "sprites/blockmaker/bm_block_trampoline_small.spr";    //custom
new const gszBlockSpriteTrampolineLarge[] = "sprites/blockmaker/bm_block_trampoline_large.spr";    //custom
new const gszBlockSpriteSpeedBoost[] = "sprites/blockmaker/bm_block_speedboost.spr";        //custom
new const gszBlockSpriteSpeedBoostSmall[] = "sprites/blockmaker/bm_block_speedboost_small.spr";    //custom
new const gszBlockSpriteSpeedBoostLarge[] = "sprites/blockmaker/bm_block_speedboost_large.spr";    //custom
new const gszFireSprite[] = "sprites/blockmaker/bm_block_fire_flame.spr";            //custom 
Make it look like:

PHP Code:
// block sprites
new const gszBlockSpriteFire[] = "sprites/blockmaker/bm_block_fire.spr";                //custom
new const gszBlockSpriteFireSmall[] = "sprites/blockmaker/bm_block_fire_small.spr";        //custom
new const gszBlockSpriteFireLarge[] = "sprites/blockmaker/bm_block_fire_large.spr";        //custom
new const gszBlockSpriteSpeedBoost[] = "sprites/blockmaker/bm_block_speedboost.spr";        //custom
new const gszBlockSpriteSpeedBoostSmall[] = "sprites/blockmaker/bm_block_speedboost_small.spr";    //custom
new const gszBlockSpriteSpeedBoostLarge[] = "sprites/blockmaker/bm_block_speedboost_large.spr";    //custom
new const gszFireSprite[] = "sprites/blockmaker/bm_block_fire_flame.spr";            //custom 
Search for:

PHP Code:
    //precache sprites
    
precache_model(gszBlockSpriteFire);
    
precache_model(gszBlockSpriteFireSmall);
    
precache_model(gszBlockSpriteFireLarge);
    
precache_model(gszBlockSpriteTrampoline);
    
precache_model(gszBlockSpriteTrampolineSmall);
    
precache_model(gszBlockSpriteTrampolineLarge);
    
precache_model(gszBlockSpriteSpeedBoost);
    
precache_model(gszBlockSpriteSpeedBoostSmall);
    
precache_model(gszBlockSpriteSpeedBoostLarge);
    
precache_model(gszTeleportSpriteStart);
    
precache_model(gszTeleportSpriteEnd);
    
gSpriteIdFire precache_model(gszFireSprite);
    
gSpriteIdBeam precache_model("sprites/zbeam4.spr"); 
Make it look like:

PHP Code:
    //precache sprites
    
precache_model(gszBlockSpriteFire);
    
precache_model(gszBlockSpriteFireSmall);
    
precache_model(gszBlockSpriteFireLarge);
    
precache_model(gszBlockSpriteSpeedBoost);
    
precache_model(gszBlockSpriteSpeedBoostSmall);
    
precache_model(gszBlockSpriteSpeedBoostLarge);
    
precache_model(gszTeleportSpriteStart);
    
precache_model(gszTeleportSpriteEnd);
    
gSpriteIdFire precache_model(gszFireSprite);
    
gSpriteIdBeam precache_model("sprites/zbeam4.spr"); 
Search for:

PHP Code:
                    {
                    case 
SMALL:
                    {
                        
//set sprite model depending on block type
                        
switch (blockType)
                        {
                            case 
BM_SPEEDBOOSTentity_set_model(spritegszBlockSpriteSpeedBoostSmall);
                            case 
BM_FIREentity_set_model(spritegszBlockSpriteFireSmall);
                        }
                    }
                    
                    case 
NORMAL:
                    {
                        
//set sprite model depending on block type
                        
switch (blockType)
                        {
                            case 
BM_TRAMPOLINEentity_set_model(spritegszBlockSpriteTrampoline);
                            case 
BM_SPEEDBOOSTentity_set_model(spritegszBlockSpriteSpeedBoost);
                            case 
BM_FIREentity_set_model(spritegszBlockSpriteFire);
                        }
                    }
                    
                    case 
LARGE:
                    {
                        
//set sprite model depending on block type
                        
switch (blockType)
                        {
                            case 
BM_TRAMPOLINEentity_set_model(spritegszBlockSpriteTrampolineLarge);
                            case 
BM_SPEEDBOOSTentity_set_model(spritegszBlockSpriteSpeedBoostLarge);
                            case 
BM_FIREentity_set_model(spritegszBlockSpriteFireLarge);
                        }
                    }
                } 
Make it look like:

PHP Code:
                {
                    case 
SMALL:
                    {
                        
//set sprite model depending on block type
                        
switch (blockType)
                        {
                            case 
BM_SPEEDBOOSTentity_set_model(spritegszBlockSpriteSpeedBoostSmall);
                            case 
BM_FIREentity_set_model(spritegszBlockSpriteFireSmall);
                        }
                    }
                    
                    case 
NORMAL:
                    {
                        
//set sprite model depending on block type
                        
switch (blockType)
                        {
                            case 
BM_SPEEDBOOSTentity_set_model(spritegszBlockSpriteSpeedBoost);
                            case 
BM_FIREentity_set_model(spritegszBlockSpriteFire);
                        }
                    }
                    
                    case 
LARGE:
                    {
                        
//set sprite model depending on block type
                        
switch (blockType)
                        {
                            case 
BM_SPEEDBOOSTentity_set_model(spritegszBlockSpriteSpeedBoostLarge);
                            case 
BM_FIREentity_set_model(spritegszBlockSpriteFireLarge);
                        }
                    }
                } 
Search for:

PHP Code:
                //set task for animating the sprite
                
if (blockType == BM_FIRE || blockType == BM_TRAMPOLINE)
                {
                    new 
params[2];
                    
params[0] = sprite;
                    
params[1] = 8;        //both the fire and trampoline sprites have 8 frames
                    
set_task(0.1"taskSpriteNextFrame"TASK_SPRITE spriteparams2"b");
                }
            }
        } 
Make it look like:

PHP Code:
                //set task for animating the sprite
                
if (blockType == BM_FIRE)
                {
                    new 
params[2];
                    
params[0] = sprite;
                    
params[1] = 8;        //both the fire and trampoline sprites have 8 frames
                    
set_task(0.1"taskSpriteNextFrame"TASK_SPRITE spriteparams2"b");
                }
            }
        } 
Now search for:

PHP Code:
gszBlockModels[BM_TRAMPOLINE] = gszBlockModelDefault
Make it look like:

PHP Code:
gszBlockModels[BM_TRAMPOLINE] = gszBlockModelTrampoline
Now search for:

PHP Code:
//if blocktype is one which requires an additional sprite
if (blockType == BM_FIRE || blockType == BM_TRAMPOLINE || blockType == BM_SPEEDBOOST
Make it look like:

PHP Code:
//if blocktype is one which requires an additional sprite
if (blockType == BM_FIRE || blockType == BM_SPEEDBOOST
Your done! All we were simply doing was removing the sprite, and placing your skin!
__________________
Currently accepting payment US DOLLARS ONLY for custom plugins, contact me through PM.

Last edited by GXLZPGX; 12-23-2009 at 10:59.
GXLZPGX is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 12-23-2009 , 09:23   Re: Blockmaker - Removing Original Trampoline Skin
Reply With Quote #2

You forgot:
Code:
gszBlockModels[BM_TRAMPOLINE] = gszBlockModelDefault;

Code:
gszBlockModels[BM_TRAMPOLINE] = gszBlockModelTrampoline;
and:
Code:
//if blocktype is one which requires an additional sprite if (blockType == BM_FIRE || blockType == BM_TRAMPOLINE || blockType == BM_SPEEDBOOST)

Code:
//if blocktype is one which requires an additional sprite if (blockType == BM_FIRE || blockType == BM_SPEEDBOOST)
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
GXLZPGX
Veteran Member
Join Date: Sep 2009
Old 12-23-2009 , 11:00   Re: Blockmaker - Removing Original Trampoline Skin
Reply With Quote #3

Ah yes thank you. Forgot about those. What happened was, I published the topic too early, and forgot to add the rest of the codes, so I left out a few without noticing, I was in a hurry to fix it so people wouldn't go "Wtf" when they tried the tutorial and figured it wasn't working. I have added it to the tutorial.
__________________
Currently accepting payment US DOLLARS ONLY for custom plugins, contact me through PM.
GXLZPGX is offline
NiQu
Veteran Member
Join Date: Nov 2009
Old 12-25-2009 , 23:16   Re: Blockmaker - Removing Original Trampoline Skin
Reply With Quote #4

Isnt
gszBlockModelDefault
the model for the trampoline ?
NiQu is offline
Toastt
BANNED
Join Date: Nov 2009
Old 12-26-2009 , 11:52   Re: Blockmaker - Removing Original Trampoline Skin
Reply With Quote #5

pretty cool tutorial, maybe you should make one on adding poles or properties
PROPERTIES
Toastt is offline
GXLZPGX
Veteran Member
Join Date: Sep 2009
Old 12-26-2009 , 18:32   Re: Blockmaker - Removing Original Trampoline Skin
Reply With Quote #6

Quote:
Originally Posted by NiQu View Post
Isnt
gszBlockModelDefault
the model for the trampoline ?
No actually, if its set to:

PHP Code:
gszBlockModelDefault 
It will use the default skin, even if you change the skin in "blockmaker_models.ini"

But if its:

PHP Code:
gszBlockModelTrampoline 
It will use the skin you set in "blockmaker_models.ini"
__________________
Currently accepting payment US DOLLARS ONLY for custom plugins, contact me through PM.
GXLZPGX is offline
Reply


Thread Tools
Display Modes

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 14:30.


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