View unanswered posts | View active topics It is currently Thu Dec 26, 2024 8:19 pm



Reply to topic  [ 5 posts ] 
 Guns being indestructible while being equipped/held 
Author Message

Joined: Sat Jul 14, 2012 3:07 am
Posts: 6
Reply with quote
Post Guns being indestructible while being equipped/held
Hey there guys, I've been lurking around here for a while, but now there's something I'd like to ask.

Would it be possible to make all weapons held ignore bullets/harmful things (just like they ignore actors stepping or falling over them). So basically if you're holding an smg for example, and someone shoots you, the bullet would go past the weapon and hit you in the stomach... (or head, depending where you actor is holding it). The only way to destroy that smg would be to first kill the actor, and then shoot/blow up the gun while it's on the ground.

If someone already found a way this happen, or there's already a mod that does that, would anyone be willing to share?

This should only apply for weapons.. and maybe drills too.. but as for tools, it would make items such as Riot Shields useless, so those should probably remain the same.


Sat Jul 14, 2012 3:16 am
Profile
User avatar

Joined: Tue Jul 03, 2012 9:44 pm
Posts: 69
Location: under your bed
Reply with quote
Post Re: Guns being indestructible while being equipped/held
Why would you want that? it makes the game way to easy then


Sun Jul 15, 2012 7:16 pm
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Fri Jan 07, 2011 8:01 am
Posts: 6211
Location: In your office, earning your salary.
Reply with quote
Post Re: Guns being indestructible while being equipped/held
The Riot Shield is not a tool. It's a Held Device. A Shield.


Now, I think it's possible to do this. Like, setting GetsHitByMOs = 0, and it wouldn't be able to get hit. But, actors wouldn't be able to grab them.

Probably a longer lua workaround, but that would be laggy, considering the amount of weapons during a match, and I'd bet it would be unreliable.


Plus, half of the fun in CC is destroying your opponents weapons, leaving them helpless out there :D


Sun Jul 15, 2012 9:58 pm
Profile

Joined: Fri Sep 10, 2010 1:48 am
Posts: 666
Location: Halifax, Canada
Reply with quote
Post Re: Guns being indestructible while being equipped/held
Xeonargh's mod has this, find out how he does it there and use that script.


Sun Jul 15, 2012 10:03 pm
Profile
User avatar

Joined: Sat Nov 03, 2007 9:44 pm
Posts: 1916
Location: Flint Hills
Reply with quote
Post Re: Guns being indestructible while being equipped/held
Code:
function Update(self)
   if self.ID ~= 255 then
      self.GetsHitByMOs = false
   else
      self.GetsHitByMOs = true
   end
end

It's simple enough that I imagine it's plenty reliable and won't cause much lag.
Just plop this script on every device you want affected. If it already has a script, just tack the contents of this update function into the contents of the existing script's update function. (or give that script this update function if it doesn't have one already)
But, other scripts that do things with held weapons won't work if the held weapon has this going on; other scripts than its own won't be able to reference it when it's getshitbymos=0.


Tue Jul 17, 2012 1:44 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users


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

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.246s | 13 Queries | GZIP : Off ]