Difference between revisions of "GetLastPlayerAction"

From GECK

 
Line 4: Line 4:
  
 
=='''Syntax'''==
 
=='''Syntax'''==
 
 
  GetLastPlayerAction  
 
  GetLastPlayerAction  
 +
{{:ActionIndex}}
  
 
=='''Examples'''==
 
=='''Examples'''==
 
 
  if GetLastPlayerAction == 2
 
  if GetLastPlayerAction == 2
 
Condition is true if last action performed by player was throwing a grenade.
 
Condition is true if last action performed by player was throwing a grenade.
 
=='''Notes'''==
 
*See [[ActionIndex]] for current List of player actions and what value they equate to.
 
 
  
 
=='''See Also'''==
 
=='''See Also'''==
 
[[IsPlayerActionActive]]
 
[[IsPlayerActionActive]]
 
=='''Reference'''==
 
None provided.
 
<!-- [[GetLastPlayerAction_Reference|List of functions that use GetLastPlayerAction]]  (wiki) -->
 
  
 
[[Category:Functions]]
 
[[Category:Functions]]
 +
[[Category:Animation Functions]]
 
[[Category:Condition Functions]]
 
[[Category:Condition Functions]]

Revision as of 16:19, 20 December 2008

Description

GetLastPlayerAction gets the last Action the player performed. Not called on a reference and no parameters. In a condition you can test the return values against the action number.

Syntax

GetLastPlayerAction 

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

if GetLastPlayerAction == 2

Condition is true if last action performed by player was throwing a grenade.

See Also

IsPlayerActionActive

Personal tools