Garry's Mod | Door Breach | Help changing position of bomb...
2 replies, posted
Hello,
I'm making an addon and I'm having a problem. When I plant a bomb on door it looks like this:
[url]http://steamcommunity.com/sharedfiles/filedetails/?id=522867496[/url]
[B]I have changed it and have this now:
[/B]
[url]http://steamcommunity.com/sharedfiles/filedetails/?id=522890411[/url]
HOW DO I MAKE IT SO IT LOOKS LIKE A BOMB PLANTED ON DOOR? So it's not going through door?
init.lua:
[code]
function ENT:Initialize()
self:SetModel("models/props_lab/reciever01d.mdl");
self:PhysicsInit(SOLID_VPHYSICS);
self:SetMoveType(MOVETYPE_NONE);
self:SetSolid(SOLID_VPHYSICS);
local phys = self:GetPhysicsObject()
if (phys:IsValid()) then
phys:Wake()
end
end
[/code]
[editline]22nd September 2015[/editline]
Also the last end ends Initialize
It looks like you're just setting the position of your bomb to the GetPos from the door. You'll need to get the local (center) position and add it to the world position. Alternatively [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Entity/WorldSpaceCenter]Entity:WorldSpaceCenter[/url] might work?
Could you please stop, spamming the forums with the same thread over and over again? People already helped you with this, and I also told you how to fix this - Simply try what mcd1992 said, or look in the PAYDAY 2 Banking addon.
Sorry, you need to Log In to post a reply to this thread.