dr death jm 117 Posted May 23, 2014 realy noob question, but i have razor wire on mission id like it to cause a small amout of damage. any help thanks. Share this post Link to post Share on other sites
IT07 10 Posted May 23, 2014 (edited) if using the editor; give the wire the name "barbWire" and put this in it's Init: this execVM"barbwiredamage.sqf"; then create a file called barbwiredamage.sqf, save it in the root of your mission folder and put this inside it: Private [ "_distance" ]; while (alive player) do { sleep 1; _distance = player distanceSqr barbWire; if (_distance < 0.1) then { sleep 0.5; player setDamage 0.05; }; } else { hint"W00ps, you died. I should stop executing this script."; }; Now you have one barbwire that will give you the thing you want. But if you are going to put a shitload (more than 30) razor wires in your mission, it would be better not to use this method. Something to do with script spam. ---------- Post added at 15:05 ---------- Previous post was at 14:46 ---------- let me know if it works :) I just made that out of the top of my head. Bored at work xD Edited May 23, 2014 by IT07 Share this post Link to post Share on other sites
dr death jm 117 Posted May 23, 2014 awesome thanks... ill lrt you know in a bit giving kids lunch and nap... ---------- Post added at 01:21 PM ---------- Previous post was at 12:38 PM ---------- na didnt work ... this execVM"barbwiredamage.sqf"; <--- gave me expect nothing so i edited, this = execVM"barbwiredamage.sqf"; but nothing happend ...:j: Share this post Link to post Share on other sites
brians200 51 Posted May 23, 2014 0= this execVM "barbwireddamage.sqf"; Share this post Link to post Share on other sites
dr death jm 117 Posted May 23, 2014 (edited) ill try that.. nope ... no script errors but nothing hapends, Im jumping all over the barbwire. Edited May 23, 2014 by Dr Death JM Share this post Link to post Share on other sites
f2k sel 164 Posted May 23, 2014 Private [ "_distance" ]; while {alive player} do { sleep 1; _distance = player distance _this; if (_distance < 3) then {// adjust for best results sleep 0.5; player setDamage (damage player)+0.05;// 0.05 = damage each second }; }; hint "W00ps, you died. I should stop executing this script." Share this post Link to post Share on other sites
dr death jm 117 Posted May 23, 2014 (edited) testing it now awesome works... thanks alot all of you ... 1 more question how to add the player to yell or so sort a responce to being hurt by the razor wire? Edited May 23, 2014 by Dr Death JM Share this post Link to post Share on other sites