I agree with NSW. You don't need another weapon at all. Avoid to create new weapons unless you have to.
Its better to try to learn so you can judge when to use scripts or when to use weapons. Weapons are
not for simple cases like "oh, I want my character to have a different walk velocity, so I will make another weapon". Its just a waste of resource.
Since you are working with BB on this mod, I am pretty sure you already have part of his library of scripts, like "keymove". So you just put this code in every frame you want to make it to move
2 is the velocity you want.
If you don't have the code, here is the function:
Code:
void keymove(float V)
{// Move hero if direction button is pressed
void self = getlocalvar("self");
int iPIndex = getentityproperty(self,"playerindex"); //Get player index
float xdir = 0;
float zdir = 0;
if (playerkeys(iPIndex, 0, "moveleft")){// Left is pressed?
xdir = -V;
} else if(playerkeys(iPIndex, 0, "moveright")){// Right is pressed?
xdir = V;
}
if(playerkeys(iPIndex, 0, "moveup")){// Up is pressed?
zdir = -V/2;
} else if(playerkeys(iPIndex, 0, "movedown")){// Down is pressed?
zdir = V/2;
}
changeentityproperty(self, "velocity", xdir, zdir);
}
Just put it in your animationscript. Basically, it makes the same thing of the code NSW posted above. Both will work.
So, you put one of those codes on your block animation and it will move. If you character blocks with the Special button, you just need to add "holdblock 1" to the character header and he will hold the block. If not, you will need to check the link NSW posted above for a button hold scripted block.
About the walls, its not a simply
subject_to_wall change, because if you release the block inside a wall, your character will:
a) moved on top of the wall (if it is not tall)
b) removed (killed) from the screen if the wall is tall.
You will need to work with an Antiwall code. BB made one, I believe its in your game script library already.