detecting impact on world
How would I detect an impact of a moving entity with the world, not another entitiy.
Or! Does the world count as an entitiy(0)? In which case I cacn register FM_Touch Or! Using maths I can work out the ETA of the moving entity and the world and use a set_task to make it explode - and then FM_Touch in case it hits an entity such as a player which would block the path to the wall |
Re: detecting impact on world
register_touch("player", "worldspawn", "Touched")
|
Re: detecting impact on world
What's the situation?
You can also check its velocity. |
Re: detecting impact on world
It's a rocket which is to explode on impact. I think register_touch is the best method.
Thanks EvolDay |
Re: detecting impact on world
Yeah but in your case, don't forget to write the rocket classname, also use "*" as classname ( touched ) to detect whatever worldspawn, player or entity.
|
Re: detecting impact on world
Quote:
Coolio, heres the code I will probably use: PHP Code:
PHP Code:
PHP Code:
|
Re: detecting impact on world
Quote:
/home/groups/amxmodx/tmp3/texto8Ozhk.sma(97) : error 033: array must be indexed (variable "-unknown-") /home/groups/amxmodx/tmp3/texto8Ozhk.sma(102) : error 033: array must be indexed (variable "-unknown-") |
Re: detecting impact on world
Nevermind, equali. I always forget :)
|
Re: detecting impact on world
The first register_touch() is enough and in fw_rocket_touch(), you just need the 2 fm_* function. You can remove what is left. ( both if() + return )
|
Re: detecting impact on world
Quote:
Also what decides who the toucher and the touched is? Also what would happen if two rockets collided? |
| All times are GMT -4. The time now is 13:56. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.