• Checking if ENT is on another entity or not
    2 replies, posted
[b]EDIT: [/b] Okay here is what i'm trying to do: I have two entities, call them: 1 = ENT which is on fire (ANY) 2 = ENT which is not on fire (SPECIFIC ENTITY) I am looking for a way to detect upside, downside, leftside and rightside of 2 and check if there's base source engine fire near it. If it's possible to detect if there's 1 and it's named "ent_something" then much better. Also 1 is on fire using Ignite(num)
If you want to check if an entity is on fire, simply use the ent:IsOnFire() function ( [URL]http://wiki.garrysmod.com/page/Entity/IsOnFire[/URL] ) To check for source engine fires, check for entities with the class "env_fire" ( [URL]https://developer.valvesoftware.com/wiki/Env_fire[/URL] ). Either using ents.FindByClass("env_fire") and looping through them and checking if they're inside a certain radious or using ents.FindInSphere ( [URL]http://wiki.garrysmod.com/page/ents/FindInSphere[/URL] ) or ents.FindInBox ( [URL]http://wiki.garrysmod.com/page/ents/FindInBox[/URL] ) and looping through the results there and checking if the class is "env_fire"
[QUOTE=goldenlukis;41546388]If you want to check if an entity is on fire, simply use the ent:IsOnFire() function ( [URL]http://wiki.garrysmod.com/page/Entity/IsOnFire[/URL] ) To check for source engine fires, check for entities with the class "env_fire" ( [URL]https://developer.valvesoftware.com/wiki/Env_fire[/URL] ). Either using ents.FindByClass("env_fire") and looping through them and checking if they're inside a certain radious or using ents.FindInSphere ( [URL]http://wiki.garrysmod.com/page/ents/FindInSphere[/URL] ) or ents.FindInBox ( [URL]http://wiki.garrysmod.com/page/ents/FindInBox[/URL] ) and looping through the results there and checking if the class is "env_fire"[/QUOTE] Overall good, same things i wanted to know, Thank you!
Sorry, you need to Log In to post a reply to this thread.