Jump to content

Fire


CowTurbo

Recommended Posts

Isnt there no function to get fire position and is it still fireing ?

Example: You create fire using

fire = createFire ( x,y,z , 3 ) 

and now i wanna get the fire pos

getFirePos ( fire ) 

( I know, no such function ) but there isnt no function for it, getElementPosition dont get it.

Also, i cant check is it still fireing, something like isFireAlive ( fire ) and it can return true or false ...

so, i wanna ask isnt it possible with no way ? if not, then my gamemode wont be cool..

Link to post

When the key is held down, use getElementMatrix on the fire truck to get position of water origin, use getVehicleTurretPosition to get the direction of water and store this data into a table. Set a timer or attach a client render event to a function which cycles through the table, changes the coordinates in every table element depending on velocity data, decreases Z velocity, giving a gravity effect, checks the distance between stored coordinates and fire object and deletes the object if the distance is small enough. If you want to see the trajectory of these water "particles", you can draw them using getScreenFromWorldPosition and DX drawing functions. So all you need to do is making the trajectory of these "particles" match the trajectory of water which is coming out of the fire truck. I've done this in the past and that wasn't hard.

Link to post

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...