Difference between revisions of "IsPlayerActionActive"

From GECK

m
Line 6: Line 6:
  
 
  IsPlayerActionActive [[ActionIndex]]
 
  IsPlayerActionActive [[ActionIndex]]
 
+
{{:ActionIndex}}
 
=='''Examples'''==
 
=='''Examples'''==
  
 
  IsPlayerActionActive 8
 
  IsPlayerActionActive 8
 
Tests to see if the player is currently standing on a table or chair.
 
Tests to see if the player is currently standing on a table or chair.
 
 
=='''Notes'''==
 
=='''Notes'''==
 
*Multiple actions being performed at the same time will return true for each of the actions.
 
*Multiple actions being performed at the same time will return true for each of the actions.
Line 17: Line 16:
  
 
=='''See Also'''==
 
=='''See Also'''==
[[ActionIndex]]
+
* [[GetLastPlayerAction]]
 
+
=='''Reference'''==
+
None provided.
+
<!-- [[IsPlayerActionActive_Reference|List of functions that use IsPlayerActionActive]]  (wiki) -->
+
  
 
[[Category:Functions]]
 
[[Category:Functions]]
 
[[Category:Condition Functions]]
 
[[Category:Condition Functions]]
 
[[Category:Godsend Functions]]
 
[[Category:Godsend Functions]]

Revision as of 17:17, 20 December 2008

Description

IsPlayerActionActive tests to see if an action is currently being done by the player. Not called on a reference and the parameter is what action you are testing.

Syntax

IsPlayerActionActive ActionIndex

Action Indices

  • 1 = PLAYER_ACTION_SWING_MELEE_WEAPON
  • 2 = PLAYER_ACTION_THROW_GRANADE
  • 3 = PLAYER_ACTION_FIRE_WEAPON
  • 4 = PLAYER_ACTION_LAY_MINE
  • 5 = PLAYER_ACTION_Z_KEY_OBJECT
  • 6 = PLAYER_ACTION_JUMPING
  • 7 = PLAYER_ACTION_KNOCKING_OVER_OBJECTS
  • 8 = PLAYER_ACTION_STAND_ON_TABLE_CHAIR
  • 9 = PLAYER_ACTION_IRON_SIGHTS
  • 10 = PLAYER_ACTION_DESTROY_OBJECT

Examples

IsPlayerActionActive 8

Tests to see if the player is currently standing on a table or chair.

Notes

  • Multiple actions being performed at the same time will return true for each of the actions.
  • Actions stay in based on either a timer or “stopping” the action. Shooting the gun stays in for about 2 mins of game time after words but Z keying and standing on furniture returns false as soon as you stop doing them.

See Also

Personal tools