Difference between revisions of "IsPlayerActionActive"

From the Fallout3 GECK Wiki
Jump to navigation Jump to search
imported>Kkuhlmann
 
imported>Ez0n3
m
 
(12 intermediate revisions by 6 users not shown)
Line 1: Line 1:
=='''Description'''==
{{Function
|origin = GECK1
|summary = Tests to see if the player is currently performing a specific action.  If the player is performing the specified action, [[IsPlayerActionActive]] returns 1, whereas if the player is not performing the specified action [[IsPlayerActionActive]] returns 0.
|name = IsPlayerActionActive
|returnType = int
|returnVal = 0, 1
|arguments = {{FunctionArgument
  |Name = [[ActionIndex]]
  |Type = int
  |Value = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
}}
|example = IsPlayerActionActive 8
Returns 1 if the player is standing on a table or chair, and returns 0 if the player is not standing on a table or chair.
}}
{{:ActionIndex}}


'''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.
==Notes==
 
=='''Syntax'''==
 
IsPlayerActionActive [[ActionIndex]]
 
=='''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.
*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.
*Actions stay "active" based on either a timer or “stopping” the action. For example, "firing a weapon" remains active for about 2 minutes of game time after the weapon is fired, but Z keying and standing on furniture return false as soon as the activity is stopped.
 
* PLAYER_ACTION_IRON_SIGHTS (9), and possibly others, will not return true if the player is in combat.  This is most likely because the IsPlayerActionActive function was intended for NPC dialogue commenting on the player's actions (e.g., when the player takes a test shot in the middle of town), which would be out of place in the middle of combat.  An alternative is to use [[FOSE]] to check '''IsControlPressed''' for the Block/Aim control.
=='''See Also'''==
[[ActionIndex]]


=='''Reference'''==
==See Also==
None provided.
*[[GetLastPlayerAction]]
<!-- [[IsPlayerActionActive_Reference|List of functions that use IsPlayerActionActive]] (wiki) -->


[[Category:Functions]]
[[Category:Functions]]
[[Category:Functions (GECK 1.1)]]
[[Category:Condition Functions]]
[[Category:Condition Functions]]
[[Category:Condition Functions (GECK 1.1)]]
[[Category:Godsend Functions]]
[[Category:Godsend Functions (GECK 1.1)]]

Latest revision as of 04:41, 15 January 2011

< [[::Category:Functions|Category:Functions]]

A function included in the GECK version 1.1.0.36.

Description

Tests to see if the player is currently performing a specific action. If the player is performing the specified action, IsPlayerActionActive returns 1, whereas if the player is not performing the specified action IsPlayerActionActive returns 0.

Syntax

[help]
(0, 1:int) IsPlayerActionActive ActionIndex:int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}

Example

IsPlayerActionActive 8

Returns 1 if the player is standing on a table or chair, and returns 0 if the player is not standing on a table or chair.

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

Notes

  • Multiple actions being performed at the same time will return true for each of the actions.
  • Actions stay "active" based on either a timer or “stopping” the action. For example, "firing a weapon" remains active for about 2 minutes of game time after the weapon is fired, but Z keying and standing on furniture return false as soon as the activity is stopped.
  • PLAYER_ACTION_IRON_SIGHTS (9), and possibly others, will not return true if the player is in combat. This is most likely because the IsPlayerActionActive function was intended for NPC dialogue commenting on the player's actions (e.g., when the player takes a test shot in the middle of town), which would be out of place in the middle of combat. An alternative is to use FOSE to check IsControlPressed for the Block/Aim control.

See Also