Need to make an entity freeze when it hits the wall.
6 replies, posted
In my tripmine project, I need to make an entity freeze when hitting the worldspawn.
But ENT:Touch won't work because; "This only works for brush entities and for entities that have Entity:SetTrigger set to true."
Any idea on how I could check if the entity touches the worldspawn?
Edit: I'm throwing the entity against the wall with a Swep so the physics is moving around a lot. This makes doing a trace difficult.
I don't know coding but you can try look up at the code of "Battlefield 4 C4"
Maybe that will help you somehow
[editline]3rd November 2016[/editline]
Oops it was Black Ops, rip my reading
Here the link: [url]https://steamcommunity.com/sharedfiles/filedetails/?id=297646940[/url]
Thanks i'll look at it.
[img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Entity/AddCallback]Entity:AddCallback[/url]
and [url]https://wiki.garrysmod.com/page/Entity_Callbacks[/url]
these might be helpful
Why not [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/ENTITY/PhysicsCollide]ENT:PhysicsCollide[/url]?
(and [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/PhysObj/EnableMotion]PhysObj:EnableMotion[/url] if you haven't found it yet)
[QUOTE=NeatNit;51300321]Why not [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/ENTITY/PhysicsCollide]ENT:PhysicsCollide[/url]?
(and [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/PhysObj/EnableMotion]PhysObj:EnableMotion[/url] if you haven't found it yet)[/QUOTE]
ent.physicscollide doesn't work on stuff like prop_physics
based on OP's wording it sounded like he was pushing around arbitrary physics objects
[QUOTE=Winter;51298862]In my tripmine project, I need to make an entity freeze when hitting the worldspawn.[/QUOTE]
Seems obvious to me that the tripmine SENT is the entity in question
Sorry, you need to Log In to post a reply to this thread.