Jump to content
Sign in to follow this  
CommuneCode

How to lower the damage on a gun with a script

Recommended Posts

I am making a paintball mission and I need the guns given to players to not kill them but to just be able to run another script when the damage is dealt... is there any lower the damage a gun does with a script so it doesnt kill the players? :j:

Share this post


Link to post
Share on other sites

that looks very complicated... is there a way to do it with the weapons themselves, like not through the players because the way i plan on scripting it to tell the difference between teams is by the different damage the weapons do... im not script orientated and I can only do basic stuff... if not though I will try to figure that out

---------- Post added at 02:14 ---------- Previous post was at 02:02 ----------

also if anyone has a towing script for arma 3 that would be great... I cant manage to find a good one

Share this post


Link to post
Share on other sites

Cool. I would love to see a "paintball" setup for some "training" areas. Non-lethal with colored markings.

Not sure how in the heck you could do this. Fingers crossed. Anyone got good ideas or leads? :pray:

Share this post


Link to post
Share on other sites

Paintball:

This should simulate paintball pretty well. Add this to playable units init

this AddEventHandler ["HandleDamage", {False}];

You could also maybe come up with a scoring system using the hit EH. idk about applying any sort of paint markings though.

Share this post


Link to post
Share on other sites
that looks very complicated...

It is actually much easier than creating a workaround to do it in a different way. Also, the Eventhandler actually tells you who the shooter was, so sorting out who's shooting who is as easy as it gets.

Share this post


Link to post
Share on other sites

well without giving too much of my ideas away the way I wanted to do it was set the damage a certain weapon does to say 0.1, then use the event handler for player damage to tell the script to say "hey this guy took this much damage so he is on this team and needs to go to this box to sit out till the match is over"

Share this post


Link to post
Share on other sites

Aye sure but theres no need for that sort of constuct (which wouldn't work very well anyway *) when you're using the handledamage eventhandler.

Additionally, you could use fired-eventhandlers to make your bullets go slower (more like real paintball bullets) and to add some effects. (depending on how far you want to take this)

*: There is no such thing as a fixed damage value for a certain weapon. You have ammotypes and muzzlespeed. The resulting damage depends on multiple factors. (unless you're using "handleDamage)

Share this post


Link to post
Share on other sites

ok all these links are great to get me started but they dont tell me how the hell to make them work in a script

---------- Post added at 20:43 ---------- Previous post was at 20:06 ----------

I made a new thread if you have any suggestions please put them here, if you want to post stuff about coding to help me, keep posting here... Thanks, ragin.Click here to email me and I will try to get back to you

Edited by CommuneCode
Added e-mail

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×