So I'm not a Lua master and was wondering if it would be possible to make bean bag ammo?
It would knock the actor prone for oh say 10 - 20 seconds and they wouldn't be able to get up or shoot or anything
As far as stun ammo all I've seen is the shock - makes em spaz out - stuff.
I can think of an .ini way to do it where the bullet has no mass but high velocity and is a TDExplosive or MOSRotating i think. Well when I discovered it I was using a TDExposive. It used to knock actors around in older builds without always hurting or dismembering them. Not quite what I would like to do though.
Wed Aug 24, 2011 12:54 am
Azukki
Joined: Sat Nov 03, 2007 9:44 pm Posts: 1916 Location: Flint Hills
Re: Bean Bag ammo
Yeah, it's entirely possible to get those effects. Wow, I've never had a script work so well [read: at all] on the first try! Apply this script to a HitsMOs = 0 bullet sort of object, with a lifetime as long as you want the stun effect to last. Obviously this isn't aesthetically perfect, you probably want them on their back and unable to aim, but it's functional.
Code:
--beanbagammo function Update(self) self.x = MovableMan:GetMOFromID(SceneMan:CastMORay(self.Pos,Vector(self.Vel.X,self.Vel.Y):SetMagnitude(30), self.ID, 0, true, 0)) if self.x then self.z = ToActor(MovableMan:GetMOFromID(self.x.RootID)); if self.z then if self.z.Health > 1 then self.target = self.z else print("ding dong, the target's dead, previous bullets blew off his head") end else print("bean bag found something, but it wasn't an actor") end end if self.target then if self.z.Health > 1 then self.Pos = self.target.Pos self.Vel = self.target.Vel self.target:GetController():SetState(Controller.WEAPON_FIRE,false) self.target:GetController():SetState(Controller.BODY_CROUCH,true) self.target:GetController():SetState(Controller.BODY_JUMP,false) self.target:GetController():SetState(Controller.BODY_JUMPSTART,false) self.target:GetController():SetState(Controller.AIM_SHARP,false) self.target:GetController():SetState(Controller.MOVE_LEFT,false) self.target:GetController():SetState(Controller.MOVE_RIGHT,false) end end end
Bah, crashes the game if they settle into terrain due to death while stunned. fixed
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum