Hello <wait:2>World.
1. Add a communication actor to the level
(the pawn-shaped button in the bottom-left) or (Actor Browser »
SFObject » SFCommunication)
2. Open it's properties window (F4)
3. For now, all we will add is the following text under "SpatialFear
» CommunicationProtocol » [0]"
This is a simple communication example. <wait:2>
Let's go ahead and clear the window. <cls> Here I go skipping
lines. \n\n\n That's all for now...<wait:2><cls>
4. You may want to modify the communication by changing the type of
communication it it. Under "SpatialFear » Type", you
can change it to "CT_DataNode"
5 . Now add a trigger to the level. Insert a descriptive name into
the trigger's event, and the same word into the Communication's Tag.
"Events » Event/Tag"
6 . Now, test your level ad run into the trigger. A communication
should start |
 |
Animations (sub: [0]-[14]) |
A list of available animations to the face in the comm window. Values
depend on the [Type] of communication you are using. Not relevent
for a [CT_DataNode]. |
bAddToConversationsHistory |
Defines whether or not a communication will be added to the game's
running communication log/history. |
bHidePlayerHUD |
Toggle the player's HUD on/off while in the conversation. |
bPlayOnlyOnce |
Toggles whether or not a communication can be played more than once. |
CommunicationProtocol (sub: [0]-[24]) |
The body of the communication. The text and commands to be processed
are entered here. |
DetailText (sub: [0]-[24]) |
Detail text, to be displayed in browser. In case you do not want
this to be generated by the system. If you think the text generated
from the system does not match, add your own one here. |
Events (sub: [0]-[24]) |
A manifesto of events that can be used in the CommunicationProtocol,
with reference from the <event:number> tag, where number is
the corresponding number in this list. |
FontSize |
The size of the font to be displayed. Choices are FS_Small, FS_Medium,
and FS_Big. |
TipNames (sub: [0]-[14]) |
Tags of actors which have an actorTip which you can reference in
the CommunicationProtocol using the <showActorTip:number:TippString>
tags where number is the corresponding number in this list. |
Title |
The title of the communication to be displayed in the communication
history. |
Type |
The type of communication to be used. Choices are CT_Captain, CT_Trainer,
CT_DataNode, and CT_NPC. Only use CT_NPC when dealing with a SFNPCCommunication,
however. |
\n |
Creates a new line |
<wait:#> |
pauses the communication for # of seconds |
<cls> |
clears the dialog window |
<showActorTip:number:TippString> |
Shows an actor tip on the HUD using number to index into the TippNames
array to find the name of the actor to show the tip for. TippString
is the string to display above the actor. |
<hideActorTip> |
hides the currently visible actor tip |
<branch:number> |
branches into a new communication, inside the communication string
array (CommunicationProtocol[number]) |
<event:number> |
fires an event, using the name configured in Events[number] |
<sound:resourcename> |
plays the sound with the name: resourcename |
<tickrate:floatVal> |
Sets the tickrate of the running text value to floatVal, using
-1 resets the tickrate to the saved tickrate before the last change. |
<playanim:number> |
Plays the animation with name Animations[number] on the captains
head. |
<playtweenanim:number:floatVal> |
Plays the animation with name Animations[number] on the captains
head using the passed tweenfactor to tween from the current animation
to the new one. |
<loopanim:number> |
Loops the animation with name Animations[number] on the captains
head. |
<looptweenanim:number:floatVal> |
Loops the animation with name Animations[number] on the captains
head. The specified tween factor is used to tween from the current
animation to the new one. |
<askYesNo:number1:number2> |
Displays a selection box asking for YES or NO. A yes selection branches
to branch: number1 and a no selection to branch number2. Unsing -1
as a branch number will continue in the current branch. |
<showWeaponDesc:number> |
Opens the weapon description dialog on the HUD, using the data from
the current weapon. If number = 1 the dialog is show, if number =
0 the dialog is hidden again. Used to introduce the weapon dialog.
You should not forget to hide the window again. This will corrupt
the rest of the HUD code. This function also enables the weapon descripton
for the visor. |
<waitForEvent:name> |
Pauses the communication until this actor receives the event with
the name: Events[number]. Make sure the event is fired sometime. There
is no timeout. |
<instantShow:floatVal:Number> |
'Hack'!! This messages shows all the text of the current branch
IMMEDIATELY in the window! No running/ticking sound. So make sure
you have no other markers like <sound> , ... in it, because
the text is not interpreted and no markers are removed. Also make
sure that the branch fits on one screen, CLS makes no sense for an
instantShow message. With [floatVal] you specify how long the message
will be shown before processing goes on. With [number] you specify
the branch that is executed next (since a<branch> tag will not
be evaluated in an instant show message. |
<animRate:float> |
Changes the animation rate for all subsequent playanim and loopanim
calls. The default setting for playback/looping is 1.0 and should
be modified with this macro. |
<giveToPlayer:classname> |
Add an inventory item to the players inventory. classname must be
the fully qualified name of an item. E.g. SFItem.SFKeyCardB. |