Difference between revisions of "IsInInterior"

From the Fallout3 GECK Wiki
Jump to navigation Jump to search
imported>Maran
imported>Cipscis
(Converted to function template, simplified example. Corrected information about IsInInterior only working on actors - this is not true)
Line 1: Line 1:
Returns 1 if the actor is in an interior cell.
{{Function
|origin = GECK1
|summary = Returns 1 if the calling reference is in an interior cell
|referenceType = RefID
|example = player.IsInInterior


==Syntax==
Returns 1 if the player is in an interior cell, and 0 if they are not.
<pre>
}}
ActorReference.IsInInterior
</pre>


==Examples==
This is one Example of IsInInterior in use. Its what I use to get followers around buggy interior cell doors if they stop following the player. I use IsInInterior here to help identify that either the NPC, the player or both are indoors.
<pre>
BEGIN GameMode
if (Player.IsInInterior == 1 && zzMMBeckettOne.IsInInterior == 1)
    if zzMMBeckettMain.MMBeckettFollowing == 1
      set zzMMBeckettsRange to GetInSameCell player
          if zzMMBeckettsRange != 1
                     
          zzMMBeckettOne.MoveTo player, 128, 0, 0
   
          endif
    endif
endif
if (Player.IsInInterior == 1 && zzMMBeckettOne.IsInInterior != 1)
    if zzMMBeckettMain.MMBeckettFollowing == 1
      set zzMMBeckettsRange to GetInSameCell player
          if zzMMBeckettsRange != 1
                     
          zzMMBeckettOne.MoveTo player, 128, 0, 0
   
          endif
    endif
endif
if (Player.IsInInterior != 1 && zzMMBeckettOne.IsInInterior == 1)
    if zzMMBeckettMain.MMBeckettFollowing == 1
      set zzMMBeckettsRange to GetInSameCell player
          if zzMMBeckettsRange != 1
                     
          zzMMBeckettOne.MoveTo player, 128, 0, 0
   
          endif
    endif
endif
END
</pre>
[[Category:Functions]]
[[Category:Functions]]
[[Category:Actor State Functions]]
[[Category:Actor State Functions]]
[[Category:Condition Functions]]
[[Category:Condition Functions]]

Revision as of 20:32, 23 April 2009

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

A function included in the GECK version 1.1.0.36.

Description

Returns 1 if the calling reference is in an interior cell

Syntax

[help]
RefID.IsInInterior

Example

player.IsInInterior

Returns 1 if the player is in an interior cell, and 0 if they are not.