Entity bounce
how to do a object(entity) bounce, when touch wall or floor?
Sorry for my bad english.:oops: |
Re: Entity bounce
set_pev(entid, pev_movetype, MOVETYPE_BOUNCE)
|
Re: Entity bounce
Yeah, but my idea would the object always flying, and bounce only when touches something.
|
Re: Entity bounce
PHP Code:
|
Re: Entity bounce
Yeah, works thx.
But now, I have prolem to detect when his entity touches some player, I'm using: RegisterHam(Ham_Touch, "info_target", "ent_touch"); But not works, someone can help me? |
Re: Entity bounce
Use engine's register_touch:
Code:
register_touch("YourClassname", "player", "ent_touch") |
Re: Entity bounce
Quote:
|
Re: Entity bounce
Are you assigning a classname for your entity? If so, registering "info_target" along with the touch hook will not trigger the function when your entity touches something. You need to hook touch with the correct entity classname in order for it to work correctly.
|
Re: Entity bounce
Make sure you set a solid type too:
Code:
// pev(entity, pev_solid) values |
Re: Entity bounce
Ok, here is my code:
PHP Code:
|
| All times are GMT -4. The time now is 19:42. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.