Skip to content

KAI_EmplacementPlayer

inkoalawetrust edited this page Sep 22, 2024 · 2 revisions

KAI_EmplacementPlayer

Description

The base player class that players morph into when they use an emplacement. The class serves the following functions:

  • A distinct class to distinguish player morphs meant for emplacements from any other player class. Since the morphing system allows for morphing to whatever player class.
  • Handling the player properly exiting whatever emplacement they're on by calling DoExitEmplacement() when they unmorph, in case they abruptly die or something and so they have to unmorph.
  • Making the KAI_Emplacement actor itself copy the orientation of the player morph as the player looks around.
  • Making it possible to exit the emplacement by checking if the player pressed BT_USE every tick while on the emplacement.

This player pawn also has all its' movement properties set to 0 to be totally stationary.

Assigning a weapon to an emplacement

Since emplacements work by morphing NPCs and players. To assign a weapon for the player to use while on it, you can simply use the MorphWeapon player property like this:

Class PlayerEmplacement : Kai_EmplacementPlayer
{
	Default
	{
		Player.MorphWeapon "MyCoolEmplacementWeapon";
	}
	//Other stuff.
}

Variables

Emplacement

Type: KAI_Emplacement pointer

A pointer to the emplacement this morph is using.

See also

Clone this wiki locally