Treatments

Treatments

« posted: Aug 15, 2015, 03:10 AM »
Trying to find where the percentage or however the scroll action "treat yourself" is listed. I checked in playerActions and did not see it.

**Edit: Found a solution.
  • Offline LouD
  • Silent but deadly ;)
  • Moderator
  • Veteran
  • ******
  • Posts: 1415

Re: Treatments

« Reply #1 posted: Aug 15, 2015, 05:03 PM »
This is game mechanics afaik.

Re: Treatments

« Reply #2 posted: Aug 15, 2015, 06:06 PM »
This is what I did
Author: http://www.kylania.com
FAK, player damage check found on Armaholic

playerActions.sqf addition
Code: [Select]
["Bandage", "map\yourPath\heal.sqf", [], 1, false, false, "", "(damage player > 0.01) && ('FirstAidKit' in (items player))"]I didn't know where to put "(damage player > 0.01) && ('FirstAidKit' in (items player))" but I found a forum post on Armaholic and edited it to work for me.

heal.sqf
Code: [Select]
_unit = _this select 1;

_unit playMove "AinvPknlMstpSlayWrflDnon_medic";
_unit setDamage 0;

Hope that helps someone also.
Also, can one of the more experienced devs tell me if Arma 2 and Arma 3 scripting are very similar or the same?
  • Offline LouD
  • Silent but deadly ;)
  • Moderator
  • Veteran
  • ******
  • Posts: 1415

Re: Treatments

« Reply #3 posted: Aug 15, 2015, 07:39 PM »
Yea I use a healSelf script aswell :)

Re: Treatments

« Reply #4 posted: Aug 15, 2015, 07:50 PM »
Is there a way to make
Code: [Select]
player removeItems "FirstAidKit";
not to remove all but only one?

This doesn't work
Code: [Select]
player removeItems ["FirstAidKit",1];I'm trying to teach myself this a little more so I don't have to bother everyone.

Re: Treatments

« Reply #5 posted: Aug 15, 2015, 08:19 PM »
there is actually an old heal.sqf in the mission =). doesn't remove the FAK thou
https://github.com/A3Wasteland/ArmA3_Wasteland.Altis/blob/master/client/items/misc/heal.sqf

try this
Code: [Select]
player removeItem "FirstAidKit";instead of
Code: [Select]
player removeItems "FirstAidKit"; (s on the end of removeItem(s)

im pretty sure it only removes one, at least i think it did last time i used it

https://community.bistudio.com/wiki/removeItems
vs.
https://community.bistudio.com/wiki/removeItem

BTW, i don't allow players that are to hurt to heal themselves
Code: [Select]
["<t color=""#FFE496"">" + "Heal self", "addons\scripts\healSelf.sqf", [], 1,false,false,"","((damage player)>0.01 && (damage player)<0.25499) && ('FirstAidKit' in (items player))"],But they can still be treated my the medic, giving them more value

Re: Treatments

« Reply #6 posted: Aug 15, 2015, 11:06 PM »
Code: [Select]
player removeItem "FirstAidKit"; worked great, thanks!
  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2488

Re: Treatments

« Reply #7 posted: Aug 17, 2015, 11:41 PM »
Trying to find where the percentage or however the scroll action "treat yourself" is listed. I checked in playerActions and did not see it.

With a FAK, it shows up if any hitpoint damage reaches 0.25, and with a medikit, it only shows up if you are a medic and if any hitpoint damage is above 0.

Hitpoint damage does not always equate global HP, you could have your arms and legs fully crippled and your global HP could still be 100, just like when you approach a fire and you start bleeding while your HP remains at 100 and suddenly it jumps to 0 and you're dead (thanks, BIS...)

Re: Treatments

« Reply #8 posted: Jun 14, 2016, 02:43 PM »
Is there a way to allow the player to heal himself 100% if he has a medi kit?

We have a small server with only 20 spots, and most players joining are alone and generally don't select the medic role. Mostly Snipers, Rifleman etc.

Being unable to heal yourself sucks. You're in game for 10 min, take a hit, can only heal yourself up to 75% and have to listen to moaning and groaning for the next 2 hrs.

Regards

SpeedBirdNam

Re: Treatments

« Reply #9 posted: Jun 14, 2016, 04:19 PM »
you could open your mission.sqm file and replace all playerspawns with the universal soldiers (e.g. b_soldier_universal_f for bluefor). they got all roles (e.g. engineer, medic, ...) enabled.
  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2488

Re: Treatments

« Reply #10 posted: Jun 14, 2016, 08:50 PM »
you could open your mission.sqm file and replace all playerspawns with the universal soldiers (e.g. b_soldier_universal_f for bluefor). they got all roles (e.g. engineer, medic, ...) enabled.

oh wow I did not know that... maybe I should implement it
  • Offline CREAMPIE
  • Armaholic
  • Veteran
  • ******
  • Posts: 1077
  • ^_^;;

Re: Treatments

« Reply #11 posted: Jun 15, 2016, 11:25 AM »
oh wow I did not know that... maybe I should implement it


hmmmm i use the specific classes in my old mission to add gear per class on spawn. If all the classes are the same i'd have to find a different way to do that :P

that said - all classes can heal themselves up to 75% using a fist aid kit , only medics can heal themselves too 100%.

LouDs heal script was cool - allows you to heal to 100% regardless of what class if you have a medkit afaik.

- from the grassy knoll -
  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2488

Re: Treatments

« Reply #12 posted: Jun 15, 2016, 04:16 PM »
hmmmm i use the specific classes in my old mission to add gear per class on spawn. If all the classes are the same i'd have to find a different way to do that :P

yeah, I came to that conclusion too, I guess I'll just keep it as-is