hellstorm77 2 Posted April 16, 2013 I was wondering if you can make a normal vehicle into a medical vehicle which can fully heal you? Share this post Link to post Share on other sites
KevsNoTrev 44 Posted April 16, 2013 (edited) H ihellstorm, hope this helps - nowhere near perfect but it works at this time, not tested on MP or dedi game but should work paste into empty sqf file and save as heal, put in mission folder. i have tested with an empty mission with a pre-injured soldier and even threw a few grenades, animation plays then you get the clean uniform and all is well. ///////////////////////// // simple heal script by KevsNoTrev ///////////////////////// // //call by using // //this addaction ["Heal","heal.sqf",[],1,false,false,"","((damage _caller)>0.2)"]; // //in a game object. _caller = _this select 1; _caller playmove "AinvPknlMstpSlayWrflDnon_medic";sleep 5; _caller setdamage 0; Edited December 1, 2014 by KevsnoTrev Share this post Link to post Share on other sites
hellstorm77 2 Posted April 18, 2013 i'm guessing you have to put this in the vehicle init nul = [] execVM "heal.sqf";? Share this post Link to post Share on other sites
KevsNoTrev 44 Posted April 18, 2013 no, put this addaction ["Heal","heal.sqf",[],1,false,false,"","((damage _caller)>0.2)"]; in the vehicle initialisation in the editor of any vehicle you want to use as a health bus!! you can take out the check for damage if you like, but as it is above this means players can still use FAK until they get to the medic vehicle. this addaction ["Heal","heal.sqf",[],1,false,false]; Share this post Link to post Share on other sites
bloodxgusher 10 Posted April 19, 2013 no, put this addaction ["Heal","heal.sqf",[],1,false,false,"","((damage _caller)>0.2)"]; in the vehicle initialisation in the editor of any vehicle you want to use as a health bus!! you can take out the check for damage if you like, but as it is above this means players can still use FAK until they get to the medic vehicle. this addaction ["Heal","heal.sqf",[],1,false,false]; I was wondering if you knew of a way to spruce this up a bit. Maybe a way to display how much are you are being healed by in increments until full health is reached. This is really cool I just hate how fast it takes to heal Share this post Link to post Share on other sites
KevsNoTrev 44 Posted April 19, 2013 yeah thought about that. I sort of need to heal in 0.05 increments until damage is nothing. I will test something out an get back to you. in the mean time, just change the sleep to something a little more realistic. 10 or 15 seconds maybe. I should probalby put a break in there somewhere if a key is pressed so it stops if the player reacts to being shot or something else where they need to move. Share this post Link to post Share on other sites
bloodxgusher 10 Posted April 19, 2013 yeah thought about that.I sort of need to heal in 0.05 increments until damage is nothing. I will test something out an get back to you. in the mean time, just change the sleep to something a little more realistic. 10 or 15 seconds maybe. I should probalby put a break in there somewhere if a key is pressed so it stops if the player reacts to being shot or something else where they need to move. Sweet. That last part sounds even better. I will test this on my server. Share this post Link to post Share on other sites
KevsNoTrev 44 Posted April 19, 2013 I found this page and it seems to work well, just put the addaction for heal on a vehicle. http://www.armaholic.com/forums.php?m=posts&q=20610 Share this post Link to post Share on other sites
hellstorm77 2 Posted April 20, 2013 is there a way to debug this so you can see your health to see if its working? ---------- Post added at 13:48 ---------- Previous post was at 13:17 ---------- when i use this there is no add action but when i use the other one at the bottom it works but i get an error this addaction ["Heal","heal.sqf",[],1,false,false,"","((damage _caller)>0.2)"]; this addaction ["Heal","heal.sqf",[],1,false,false]; Share this post Link to post Share on other sites
KevsNoTrev 44 Posted April 20, 2013 hellstorm, did you put the heal.sqf in your mission folder? there is really no reason to debug as there are no steps. it just plays an animation and then you are healed. thats why its simple. the link shows a step by step process, but its got to be slightly modified as its for a person to person healing system not from a fixed vehicle. i was trying to do it like that for hours and stumbled across the page, then i looked at my code and it was almost identical. strange huh? Share this post Link to post Share on other sites
hellstorm77 2 Posted April 21, 2013 i got it to work and also how to debug to see your damage When you preview press Esc in the debug where it says watch put in damage player everytime you want to see what damage you have taken just press Esc :) Share this post Link to post Share on other sites
KevsNoTrev 44 Posted April 21, 2013 i'll have to look at hte debug in the gui, never noticed it could be that simple. Share this post Link to post Share on other sites