GetPlayerAniId Client function

From Gothic 2 Online: Wiki
Jump to navigation Jump to search

This function was added in version: 0.0.0

Returns the animation id.

Syntax

int getPlayerAniId(int id)

Required Arguments

  • id: id of the player or npc who's animation id you want to get.

Returns

  • the animation id.

Example

addEventHandler("onKey",function(key)
{
   if (key == KEY_P)
   {
      switch(getPlayerAniId(heroId))
      {
         case 265: // checking if player is doing nothing (default anim id)
            playAni(heroId,"T_STAND_2_PEE"); // start pissing animation
            break;

         case 253: // checking if player is pissing
            playAni(heroId,"T_PEE_2_STAND"); // stop pissing animation
            break;
      }
   }
});

Related functions