AMARANT Posted February 6, 2012 Share Posted February 6, 2012 Hi there I know that fire in MTA isn't synchronized but I know the way to make a custom fire with a torch model and colshape imitating ignition of every player who gets into that colshape. But I need a possibility to extinguish that fire with firetruck. I just wanted to know the way to check if my firetruck's turret is aimed at my torch model or colshape and I think I can do it then. Link to comment
DiSaMe Posted February 6, 2012 Share Posted February 6, 2012 I once had done this by getting position of the turret using getElementMatrix on the vehicle and some calculations with offsets and making my own particles system. Technically those particles were just some data in a table. If the player held the key, the particles were created (position and velocity data was put into table). The data was repeatedly processed in short intervals (position changed because of velocity, velocity changed because of gravity). Distance from particles to fire objects was measured and if it was short enough, fire could be extinguished. Also, to make these particles repeat the trajectory of the water perfectly, I used getScreenFromWorldPosition with dxDrawRectangle to see where they go, so that I could know how to alter some constants (gravity, particle starting velocity). 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