Confirmed using r1857 and 2.3.1. Apparently, attempting to set the player's maximum health using SetActorProperty APROP_SpawnHealth has a strange effect. The player cannot pick up health restoring items that don't raise health above max, such as Medikits and Stimpacks, after having SetActorProperty called on him.
Relevant code:
Code: Select all
#library "sadface"
#include "zcommon.acs"
script 868 (void)
{
int maxhealth = GetActorProperty(0, AProp_SpawnHealth);
SetActorProperty(0, AProp_SpawnHealth, maxhealth+1);
}
My first attempt, didn't work either:
Code: Select all
script 868 (void)
{
SetActorProperty(0, AProp_SpawnHealth, (GetActorProperty(0,AProp_SpawnHealth)+1));
}
A compiled version of the top code. Run, "]puke 868", and "]summon medikit". "]Take health 1" and attempt to pick up for further proof.
sadface.pk3