Random fire
#10

The way I tackled this was creating those fire objects inside a Streamer area. Then when a player is in a fire truck and presses the shoot button, I used the IsLineInDynamicArea function to see if the player was shooting into that area.

Code:
IsLineInDynamicArea(areaid, Float:x1, Float:y1, Float:z1, Float:x2, Float:y2, Float:z2)
Those areas are simple Streamer areas. The xyz coords I used for this function are a combination of camera position and front vector.

To sum it all up in short; I trace a line from the player's camera into its looking direction (its depth), and then use the IsLineInDynamicArea to see if the line crosses the fire area. Then you can do whatever you want since you know whether the fire is being extinguished. You can delete the fire objects or slowly deduct a integer variable's value while the player is extinguishing, then delete the objects if the variable reaches zero.

Useful things for this:
Reply


Messages In This Thread
Random fire - by Astonish - 03.05.2018, 11:52
Re: Random fire - by jasperschellekens - 03.05.2018, 12:02
Re: Random fire - by SeanDenZYR - 03.05.2018, 12:08
Re: Random fire - by Astonish - 03.05.2018, 13:20
Re: Random fire - by Astonish - 04.05.2018, 11:10
Re: Random fire - by Astonish - 04.05.2018, 23:21
Re: Random fire - by CyNiC - 05.05.2018, 04:07
Re: Random fire - by Astonish - 06.05.2018, 15:05
Re: Random fire - by GTLS - 07.05.2018, 11:00
Re: Random fire - by Jstylezzz - 07.05.2018, 14:27

Forum Jump:


Users browsing this thread: 1 Guest(s)