Hi, was trying to make it so my blockmaker is not just ontop only, i want to make it so that ALL the sides of the block work. Could anyone help me out with this? I've tried
Here is a part of the code i think i have to add to
//trace directly down to see if there is a block beneath player
new Float:pOrigin[3];
new Float:pSize[3];
new Float:pMaxs[3];
new Float:vTrace[3];
new Float:vReturn[3];
entity_get_vector(id, EV_VEC_origin, pOrigin);
entity_get_vector(id, EV_VEC_size, pSize);
entity_get_vector(id, EV_VEC_maxs, pMaxs);
//calculate position of players feet
pOrigin[2] = pOrigin[2] - ((pSize[2] - 36.0) - (pMaxs[2] - 36.0));
//make the trace small for some blocks
vTrace[2] = pOrigin[2] - 1.0;
//do 4 traces for each corner of the player
for (new i = 0; i < 4; ++i)
{
switch (i)
{
case 0: { vTrace[0] = pOrigin[0] - 16; vTrace[1] = pOrigin[1] + 16; }
case 1: { vTrace[0] = pOrigin[0] + 16; vTrace[1] = pOrigin[1] + 16; }
case 2: { vTrace[0] = pOrigin[0] + 16; vTrace[1] = pOrigin[1] - 16; }
case 3: { vTrace[0] = pOrigin[0] - 16; vTrace[1] = pOrigin[1] - 16; }
}
ent = trace_line(id, pOrigin, vTrace, vReturn);
//if entity found is a block
if (isBlock(ent))
{
Thank You
__________________