# SpatialFear.SFNPCCommunication

Spatial Fear
Class: SFNPCCommunication
Description: Communication subclass for NPC communication.
List of additional tags:
Changes the viewpoint of the communication, according to the specified number:
number = 0: VP_Rotating,
number = 1: VP_BehindPlayer,
number = 2: VP_InFrontPlayer,
number = 3: VP_RightOfPlayer,
number = 4: VP_LeftOfPlayer,
number = 5: VP_ThisPosition,
number = 6: VP_FirstPerson,
- plays a chain of animations, specified in the string parameter
string = 1;3;2;4;4;3;5 . The sting is a comma separated string of numbers, that define the chain of animations.
You can use SFSTARTAGAIN inside the comma separated string, e.g. 1;3;2;4;4;3;5;SFSTARTAGAIN to start the chain again, from the beginning, after the last sequence has been played,
otherwise the actor stops playing an animation after having reached the end of the animation chain.
You can use SFLOOPEND inside the comma separated string, e.g. 1;3;2;4;4;3;5;SFLOOPEND to make the actor play the last animation of the sequence as a looping one,
in cases, where you don't want to let the deco actor in an unanimated state.
- ends any currently playing animation sequence
Communication samples
Author: Markus Nuebel

Extends:
Modifiers:
Source code

    SpatialFear.SFNPCCommunication

%%

## Variables

%function_comment% |  |  | bool | bBobDown
%function_comment% |  |  | float | fBobHeight
%function_comment% |  |  | float | fBobStep
%function_comment% |  |  | float | fHorizontalBobDir
%function_comment% |  |  | float | fViewDist
%function_comment% |  |  | float | fViewHeight
%function_comment% |  |  | rotator | m_rotDirection
%function_comment% |  |  | vector | m_vectStartLocation
%function_comment% |  |  | vector | m_vectViewLocation
%function_comment% |  |  | EViewPoint | ViewPoint

## Enums

%function_comment% | EViewPoint |  | VP_Rotating, VP_BehindPlayer, VP_InFrontPlayer, VP_RightOfPlayer, VP_LeftOfPlayer, VP_ThisPosition, VP_FirstPerson,

## Functions

|  |  | calcLocation ()
|  | vector | checkLocation (vector vecOrg)
|  |  | resetView ()
|  |  | setupView ()
|  |  | startTracking ()
|  |  | stopTracking ()
| Tracking |  | Tick (float DeltaTime)
| Tracking |  | Timer ()

## Default properties

    {
         ViewPoint=VP_ThisPosition
         fViewDist=100.000000
         fViewHeight=40.000000
         fBobStep=0.100000
         fHorizontalBobDir=1.000000
         CommunicationProtocol(0)="Hi guys, this is a NPC communication sample.\n"
         CommunicationProtocol(1)="Let's do some viewpoint changes.\nActorPosition view:Rotating view:Behind view:InFront view:Right view:Left view:"
         CommunicationProtocol(2)="Now we are playing a single animation chain.Ok, done.\nNow we are playing a looping animation chain using the param SFSTARTAGAIN.\nNow let's stop this.Now we are playing a chain that loops on the last chain element using the param SFLOOPEND.Ok, that's it for today."
         Animations(0)=GSitBase
         Animations(1)=GSitBreath
         Animations(2)=GSitLookUp
         Animations(3)=GSitLookRight
         Animations(4)=GSitGive
         Animations(5)=ChairSitTalk
         Animations(6)=AirVent
         Animations(7)=AirVentIn
         Animations(8)=Body4
         Type=CT_NPC
         bHidePlayerHUD=True
         RotationRate=(Pitch=6000,Yaw=6000,Roll=6000)
    }

class file time: 12/7/2003 3:58:24 PM - creation time: 12/7/2003 4:03:41 PM
Created with UnCodeX