Difference between revisions of "IsSwimming"

From the Fallout3 GECK Wiki
Jump to navigation Jump to search
imported>Haama
m (Removing space to prevent sorting bug)
imported>Cipscis
(Updated to use function template, added notes about player bug and workaround)
Line 1: Line 1:
Returns 1 if the actor is currently swimming.
{{Function
|CSWikiPage        = IsSwimming
|origin            = GECK1
|summary          = Returns 1 if the calling actor is swimming, and 0 if the calling actor is not swimming.
|returnType        = int
|referenceType    = Actor
|example          = BuddyRef.IsSwimming
Returns 1 if BuddyRef is swimming, and 0 if BuddyRef is not swimming.
}}
==Notes==
<ul>
<li>
[[IsSwimming]] will always return 0 if called on the player.
</li>
<li>
If the calling actor is in the Wasteland worldspace, whether or not they are swimming can be determined by checking their Z coordinate:
<pre>if GetPos Z < 10500</pre>
Note that this approach, unlike [[IsSwimming]], will work perfectly on the player.
</li>
</ul>





Revision as of 21:53, 7 May 2009

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

Link to TES4 Construction Set Wiki: IsSwimming.

A function included in the GECK version 1.1.0.36.

Description

Returns 1 if the calling actor is swimming, and 0 if the calling actor is not swimming.

Syntax

[help]
(int) Actor.IsSwimming

Example

BuddyRef.IsSwimming

Returns 1 if BuddyRef is swimming, and 0 if BuddyRef is not swimming.

Notes

  • IsSwimming will always return 0 if called on the player.
  • If the calling actor is in the Wasteland worldspace, whether or not they are swimming can be determined by checking their Z coordinate:
    if GetPos Z < 10500

    Note that this approach, unlike IsSwimming, will work perfectly on the player.