Hello,
Here I will show you, how to make normal/low/high trampoline with one action instead of three different
Here is the action:
PHP Code:
actionTrampoline(id, Float:Velo)
{
//if trampoline timeout has exceeded (needed to prevent velocity being given multiple times)
if (halflife_time() >= gfTrampolineTimeout[id])
{
new Float:velocity[3];
//set player Z velocity to make player bounce
entity_get_vector(id, EV_VEC_velocity, velocity);
velocity[2] = Velo;
entity_set_vector(id, EV_VEC_velocity, velocity);
entity_set_int(id, EV_INT_gaitsequence, 6); //play the Jump Animation
gfTrampolineTimeout[id] = halflife_time() + 0.5;
}
}
Velo = speed of trampoline.
So, we will have something like this:
PHP Code:
case BM_TRAMPOLINE: actionTrampoline(id, 500.0);
case BM_LOWTRAMPOLINE: actionTrampoline(id, 250.0);
case BM_HIGHTRAMPOLINE: actionTrampoline(id, 750.0);
Tell me if you want more examples, oki?