AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Bounce Weaponbox (https://forums.alliedmods.net/showthread.php?t=230167)

DavidJr 11-21-2013 05:41

Bounce Weaponbox
 
Hi how to make weaponbox bounces when touched the ground? I don't want to use MOVETYPE_BOUNCE.

Here's the video I've done: http://youtu.be/bG98sVmGo5Y

Here's the code:
PHP Code:

register_touch("weaponbox""player""fw_Touch"

PHP Code:

public fw_Touch(entid)
{
    new 
Float:Angle[3], Float:Avelocity[3]
    
    
velocity_by_aim(ent1000Angle)
    
    
Angle[0] = random_float(-1000.01000.0//pitch
    
Angle[1] = random_float(-1000.01000.0//yaw
    
Angle[2] = random_float(-1000.01000.0//roll
    
    
Avelocity[0] = random_float(-500.0500.0)
    
Avelocity[1] = random_float(-500.0500.0)
    
Avelocity[2] = random_float(-500.0500.0)
    
    
entity_set_int(entEV_INT_movetypeMOVETYPE_TOSS)
    
entity_set_vector(entEV_VEC_anglesAngle)
    
entity_set_vector(entEV_VEC_avelocityAvelocity)
    
entity_set_size(entFloat:{-16.0, -16.00.0}, Float:{16.016.064.0})




All times are GMT -4. The time now is 23:21.

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