Hi all script gurus! :)
I'm really new to scripting so please bear with me. (I'm in the process of learning scripting)
It's not for ArmA but VBS2, but its no difference.
What i want with the script is that you can use the medkit on you or a friend/friends if you have a medkit.
It works on you but not on friend/friends and the vbs2_medkit_use* doesn't seems to work?
*Name on the medkit in VBS2 (I think?!) Maybe you know a way to get the correct name on the medkit if it's wrong.
File: init.sqf
// Heal
{_x addaction ["Heal", "scripts\heal.sqf"]} foreach
[
s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s11, s12, s13, s14, s15, s16, s17, s18, s19, s20, s21
];
// MedKit
{_x addMagazine "vbs2_medkit_use"} foreach
[
s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s11, s12, s13, s14, s15, s16, s17, s18, s19, s20, s21
];
File: heal.sqf
disableUserInput true;
player playMove "AinvPknlMstpSlayWrflDnon_medic";
player removeMagazine "vbs2_medkit_use";
player setdammage 0;
sleep 8;
disableUserInput false;
if (true) exitWith {};
I've tried this but it's not working at all: (Not my work)
// Heal other
{_x addAction ["Heal Target", "scripts\heal.sqf", (nearestObjects [player, "Man", 5] select 0)]} forEach
[
s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16, s17, s18, s19, s20, s21
];
_target = _this select 3;
disableUserInput true;
player playMove "AinvPknlMstpSlayWrflDnon_medic";
player removeMagazine "vbs2_medkit_use";
if(isNull _target)then
{
player setDammage 0;
}
else
{
_target setDammage 0;
};
sleep 8;
disableUserInput false;
if(true)then
{
exitWith {};
};
Appreciate all the help a can get.
Thanks,
Rikard