AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Shooting ball bounce (https://forums.alliedmods.net/showthread.php?t=197165)

A. Mahone 09-29-2012 16:54

Shooting ball bounce
 
How to stop bounce a shooting ball on the ground, so it just slides above ground, and bounce at walls?

hleV 09-29-2012 17:10

Re: Shooting ball bounce
 
I guess you could try setting its movetype to MOVETYPE_BOUNCEMISSILE, and possibly its velocity's Z axis' value to 0.
Code:
entity_set_int(ent, EV_INT_movetype, MOVETYPE_BOUNCEMISSILE); new Float:velocity[3]; entity_get_vector(ent, EV_VEC_velocity, velocity); velocity[2] = 0.0; entity_set_vector(ent, EV_VEC_velocity, velocity);
Though not sure if by above ground you mean in air or on ground. If you want for it to stay on ground, then setting its gravity to some high value should do the trick.
Code:
entity_set_float(ent, EV_FL_gravity, 9999.9);

A. Mahone 09-29-2012 17:44

Re: Shooting ball bounce
 
Works nicely thx.


All times are GMT -4. The time now is 08:20.

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