Skip to content

How To Spawn an Injury

Vadim Gromov edited this page Jan 10, 2021 · 3 revisions

All _gc references in these examples are instances of a IGameController

More about injuries here

To spawn any injury, you need to call

var timeWhenBecomeActive = _gc.WorldTime.Value;
var bodyPart = BodyParts.LeftForearm;

// Any injury that is a descendant of the InjuryBase class
_gc.Health.Status.ActiveInjuries.Add(new ZaraEngine.Injuries.ActiveInjury(_gc, typeof(ZaraEngine.Injuries.LightCut), bodyPart, timeWhenBecomeActive));
Clone this wiki locally