the Gmod Conflict Or Minor Battle Action Toolkit
or,
GCOMBAT for short.
OH MAY GOWD THERE IS A CUSTEM FOREM? WHY DID NOBODY TELL ME
WAT THE FAK THERE ARE BETAS TOO
Here's an example:
local attack = cbt_dealdevhit( entity, damage, pierce )
if (attack == 0) then
--Fail code goes here
elseif (attack == 1) then
--Succeed code goes here
elseif (attack == 2) then
--Code to execute if the prop is broken by the attack goes here
end
note that with cbt_dealdevhit, the prop won't be removed, as the whole point of it is to add your own removal code if 2 is returned, as well as your own effects.
Here's an applied example, taken from my tank shell. it creates a dud round on a failure:
local attack = cbt_dealhcghit( data.HitEntity, 200, 7, self.Entity:GetPos() , self.Entity:GetPos())
if (attack == 0) then
brokedshell = ents.Create("prop_physics")
brokedshell:SetPos(self.Entity:GetPos())
brokedshell:SetAngles(self.Entity:GetAngles())
brokedshell:SetKeyValue( "model", "models/props_junk/garbage_plasticbottle003a.mdl" )
brokedshell:PhysicsInit( SOLID_VPHYSICS )
brokedshell:SetMoveType( MOVETYPE_VPHYSICS )
brokedshell:SetSolid( SOLID_VPHYSICS )
brokedshell:Activate()
brokedshell:Spawn()
brokedshell:Fire("Kill", "", 20)
brokedshell:SetColor(0,0,0,255)
local phys = brokedshell:GetPhysicsObject()
if (phys:IsValid()) then
phys:SetVelocity( self.Entity:GetPhysicsObject():GetVelocity())
end
end
Media (old):
This is a relatively new project, and I won't have a lot of time to take pictures or movies of it in action. I encourage you to post some videos and pictures in this thread. the cream of the crop may get posted here.
StickyNade's AS/V-3 "Rover", with AS/V2 "Beanie Bus" visible in the background.
The "Beanie bus" bombarding some poor bugger.
Another by StickyNade: what looks like a successful AP round hit.
This is what nebelwerfer barrages look like (again, StickyNade):
A video of Carnotite ambushing himself in the woods...

: