AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Blockmaker - Magic Carpet [H] [E] [L] [P] (https://forums.alliedmods.net/showthread.php?t=95666)

cikjam 06-25-2009 22:50

Blockmaker - Magic Carpet [H] [E] [L] [P]
 
Hello,

I need the Block Action for a Magic Carpet block, for blockmaker 4.01.
A Terrorist Only one and a Counter-Terrorist only one.

When you go on the block, you hold forward and wherever you aim you will go. You will be able to go Up, Down, Left, Right.

I've tested the BCM one, but that only stays one level and when you use the magic carpet and you like slip off eventually. It is also coded different, I don't know how to make it into Blockmaker.

Please Reply,
Thankyou.:):)

P.S: I posted it here because I dont need a whole plugin, I only need the Block Action.

+++karma

cikjam 06-26-2009 07:39

Re: Blockmaker - Magic Carpet [H] [E] [L] [P]
 
If someone could make this, would be mad. Please read it.

crazyeffect 06-26-2009 07:42

Re: Blockmaker - Magic Carpet [H] [E] [L] [P]
 
Bumping is not allowed.

You must wait 2 weeks before bumping!

cikjam 06-26-2009 08:07

Re: Blockmaker - Magic Carpet [H] [E] [L] [P]
 
Oh well, No one really ever replies on this stuff.
I want it =[

zacky 06-26-2009 08:14

Re: Blockmaker - Magic Carpet [H] [E] [L] [P]
 
I don't think anyone will help you with this because you will have to do many actions with magic carpet block.

cikjam 06-26-2009 08:47

Re: Blockmaker - Magic Carpet [H] [E] [L] [P]
 
aww

Xellath 06-26-2009 08:49

Re: Blockmaker - Magic Carpet [H] [E] [L] [P]
 
It wont use that much actions, just hook FM_Touch and move the block when the user stands on it and uses w, a, s and d.

xPaw 06-26-2009 09:15

Re: Blockmaker - Magic Carpet [H] [E] [L] [P]
 
Xellath you are right, but there also new round, save load, grab etc such stuff with magic carpet, i did one in my bm and i know :)

PHP Code:

public fwdTouchBlockiEntityid ) {
    if( 
gPlayerAlive[id] ) {
        new 
blockType peviEntitypev_body );
        
        switch( 
blockType ) {
            
// [ ... ]
            
case BM_MAGICCARPET: {
                if( 
get_user_team(id) == ) {
                    new 
Float:vVelocity[3];
                    
pevidpev_velocityvVelocity );
                    
vVelocity[2] = 0.0;
                    
set_peviEntitypev_velocityvVelocity );
                }
            }
        } 

And magiccarpet's movetype should be MOVETYPE_FLY

cikjam 06-26-2009 09:38

Re: Blockmaker - Magic Carpet [H] [E] [L] [P]
 
So what do i do with this?
I dont know much about scripting.
Can you tell me what the action thing will be. Example:
Code:

actionInvincible(id, OverrideTimer)
{
    new Float:fTime = halflife_time();
   
    if (fTime >= gfInvincibleNextUse[id] || OverrideTimer)
    {
        new Float:fTimeout = get_cvar_float("bm_invincibletime");
       
        set_user_godmode(id, 1);
        set_task(fTimeout, "taskInvincibleRemove", TASK_INVINCIBLE + id, "", 0, "a", 1);
       
        //only make player glow white for invincibility if player isn't already stealth
        if (fTime >= gfStealthTimeOut[id])
        {
            set_user_rendering(id, kRenderFxGlowShell, 255, 255, 255, kRenderNormal, 16);
        }
       
        //play invincibility sound
        emit_sound(id, CHAN_STATIC, gszInvincibleSound, 1.0, ATTN_NORM, 0, PITCH_NORM);
       
        gfInvincibleTimeOut[id] = fTime + fTimeout;
        gfInvincibleNextUse[id] = fTime + fTimeout + get_cvar_float("bm_invinciblecooldown");
    }
    else
    {
        set_hudmessage(gHudRed, gHudGreen, gHudBlue, gfTextX, gfTextY, gHudEffects, gfHudFxTime, gfHudHoldTime, gfHudFadeInTime, gfHudFadeOutTime, gHudChannel);
        show_hudmessage(id, "Wait Time: %.1f", gfInvincibleNextUse[id] - fTime);
    }
}

And Where do i put the MOVETYPE_FLY and anything else i need to do.
On which Lines.

zacky 06-26-2009 10:37

Re: Blockmaker - Magic Carpet [H] [E] [L] [P]
 
You dont even have an action, you check if player is touching magic carpet, if he is, make the magic carpet move as player moves, then you have to save origin when you create it so you can make the block come back to where you created it next round.

EDIT: even when you move the block to another place you got to save origin of it when you release it.


All times are GMT -4. The time now is 15:40.

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