Turok EX Modding Guide

Scripts ScriptObject ScriptObjectPlayer

Base class for player script. Subclassed by TurokPlayer, which is defined in scripts/player.txt.

Related classes:

Methods

void OnPickup( kActor@ pickup )

called when the player collects pickup

void OnArmorDamage( kActor@ instigator, kDictMem@ damageDef, const int damage )

gets called instead of OnDamage(), if the player has any armor and damage > 0

gets called before armor value gets decremented

damageDef stores damage type properties

all damage is absorbed, even if it's greater than the player's armor (armor will go negative)

void OnEnterWater()

called when the player goes underwater