iMr.WiFi..! Posted December 5, 2017 Share Posted December 5, 2017 How can i check if object has hitted by projectile ? [ when object has created on server side ] Link to comment
Moderators IIYAMA Posted December 5, 2017 Moderators Share Posted December 5, 2017 The processLineOfSight function would give you some information about it. https://wiki.multitheftauto.com/wiki/ProcessLineOfSight It works just fine, I use it to detonate a rocket projectile. It doesn't matter if the object is serverside or clientside, because an serverside object is visible on clientside and a projectile is only available clientside. (Maybe I do not understand your question.) Link to comment
iMr.WiFi..! Posted December 6, 2017 Author Share Posted December 6, 2017 16 hours ago, IIYAMA said: The processLineOfSight function would give you some information about it. https://wiki.multitheftauto.com/wiki/ProcessLineOfSight It works just fine, I use it to detonate a rocket projectile. It doesn't matter if the object is serverside or clientside, because an serverside object is visible on clientside and a projectile is only available clientside. (Maybe I do not understand your question.) To be Specifically, i want check if rocket has passed an object and get projectile creator .. Link to comment
Moderators IIYAMA Posted December 6, 2017 Moderators Share Posted December 6, 2017 I am not sure what you mean with passed. Because it can only pass an object when the object has no collision or is streamed out. But you could try to collect information about the projectile like this; https://wiki.multitheftauto.com/wiki/OnClientProjectileCreation And use: https://wiki.multitheftauto.com/wiki/OnClientElementDestroy To located it's last position and the moment of detonation. And use: https://wiki.multitheftauto.com/wiki/OnClientPreRender To detect anything that happens during the flight. (moment to detect the exact impact location) The projectile creator will be always available, except when the rocket explodes in an instance. (impact too close to the rocketlauncher) The rocket projectile will not trigger the lua event when this happens. Link to comment
iMr.WiFi..! Posted December 6, 2017 Author Share Posted December 6, 2017 22 minutes ago, IIYAMA said: no collision Yes, what i mean when rocket pass object has no collision .. Link to comment
Moderators IIYAMA Posted December 6, 2017 Moderators Share Posted December 6, 2017 Hmm all you can do is checking with the bounding box then. https://wiki.multitheftauto.com/wiki/GetElementBoundingBox Afaik there was ones a resource called: `Server collision` from CrystalMV (His resource site is offline) Which contains math functions to do these calculations with block/rectangle formats. I might have somewhere a copy left of it, if you want it. (let me know) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now