kuwahara<ANZAC> 0 Posted March 29, 2007 I am atempting to make 2 scripts that can add a "Treat Wounds" menu to any object/veh/unit. ok im callin on objects init. -------- [this] exec "set_medic.sqs"; -------- then the set medic script looks like this. -------- _medic = _this select 0 _medic setCaptive true _medic addAction ["Treat Wounds", "Treatwounds.sqs"] -------- ok thats where the problem begins, i have no idea how to do the things i need to do in the Treatwounds.sqs if one of the guru scripters out there can help me i would apreciate it LOTS! these are the results i need. 1. player crouches down. 2. 2-3 second delay. 3. players health retured to full. as i said, any help would be apreciated alot. Share this post Link to post Share on other sites
AgentJonathan 0 Posted March 29, 2007 addAction ["treatwounds","treatwounds.sqs"] Creck? So inside of the script you'll wanna type this, but i may just be wrong. If so, euh.... sorry. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">(_medic distance _hurtGuy < number) _medic switchmove "medic" ~4 _hurtGuy setHealth 1 exit Hopefully it works, even though i have not tried it, it should work... Share this post Link to post Share on other sites
Metal Heart 0 Posted March 30, 2007 That won't work. _medic and _hurtguy aren't defined and there is no setHealth command. Try this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_medic = _this select 0 _treated = _this select 1 _actionID = _this select 2 ?_medic distance _treated > 3: exit ?"Man" countType [_medic] > 0: goto "medicman" _treated playmove "Treated" ~3 _treated setdammage 0 exit #medicman _medic playmove "Medic" _treated playmove "Treated" ~3 _treated setdammage 0 exit Share this post Link to post Share on other sites
AgentJonathan 0 Posted April 2, 2007 There is too a setHealth command, cuz I have used that. but i have realised that i was wrong about a couple of things. THX for the right script. I've been wondering how to make any guy a medic... u rok. Share this post Link to post Share on other sites
Metal Heart 0 Posted April 2, 2007 Nope, sethealth will only produce an error message. If you use that script you might want to add a check that prevents healing at dead medics such as: ?!(alive _medic): _medic removeAction _actionID; exit Share this post Link to post Share on other sites
AgentJonathan 0 Posted April 4, 2007 WTHeck? It worked! I say--- or maybe it was setfuel, and ammo... ORRRR!!! It could be that i have goty. (Probably not tho) Share this post Link to post Share on other sites
Metal Heart 0 Posted April 4, 2007 Well go ahead and try. Perhaps it was a dream You could make a setHealth function though but then the syntax would be different: setHealth = {(_this select 0) setDammage (_this select 1)} [player, 0.901] call setHealth Share this post Link to post Share on other sites
AgentJonathan 0 Posted April 4, 2007 I do know i've used setfuel and setammo, but the sethealth could have been a dream. Or querty was always on my side! Â Â Â Share this post Link to post Share on other sites