Quote:
An entity cannot move up if something is blocking it.
Therefore, you cannot make it continue to bounce if a player is on top.
An alternative fix would be to set velocity on the player if on top of the entity when you set velocity on the entity..
|
kann mir jemand dabei helfen?
PHP Code:
case BOUNCE_BHOP:
{
set_pev(iEntity, pev_movetype, MOVETYPE_TOSS);
set_task(0.1,"bounce_bhop",iEntity);
}
____________________________
public bounce_bhop(iEntity)
{
if ( IsBlock(iEntity) )
{
new block_type = entity_get_int(iEntity, EV_INT_body);
if(pev_valid(iEntity) && block_type == BOUNCE_BHOP)
{
static property[5];
GetProperty(iEntity, 1, property);
if(pev(iEntity, pev_flags)&FL_ONGROUND)
{
new Float:velocity[3];
velocity[2] = str_to_float(property);
set_pev(iEntity, pev_velocity, velocity);
}
set_task(0.1, "bounce_bhop", iEntity);
}
}
}