3D actor object

The 3D actor object allows you to access the properties of your 3D actors. 3D actor objects are created by loading an actor definition file using the Game.LoadActor3D or Scene.LoadActor3D methods.


Методы

Actions
GoTo Makes the actor walk to a given point.
GoToObject Makes the actor walk to a specified entity.
TurnTo Makes actor turn to the given direction or to a given object.
TurnToAngle Makes actor turn to the given angle.
IsWalking Queries whether the actor is currently walking.
PlayAnim Plays an animation.
PlayAnimChannel Plays an animation in a specified channel.
StopAnim Stops a currently playing animation.
StopAnimChannel Stops a currently playing animation in the specified channel.
IsAnimPlaying Checks whether the actor is currently playing an animation
IsAnimChannelPlaying Checks whether the actor is currently playing an animation in a specified channel
SetAnimTransitionTime Sets a transition time for an animation pair
GetAnimTransitionTime Queries a transition time for an animation pair
SkipTo3D Moves the actor to a specified point in 3D space
SetTexture Assigns a new texture to a specified material
Direct control
DirectWalk Makes the character walk forward.
DirectWalkBack Makes the character walk backwards.
DirectWalkStop Stops character from walking.
DirectTurnLeft Makes the character turn counter-clockwise.
DirectTurnRight Makes the character turn clockwise.
DirectTurnStop Stops character from turning.
Shadow related functions
SetShadowImage Sets and image to be used as a simple shadow for this actor
GetShadowImage Gets the currently assigned image to be used as a simple shadow for this actor
SetLightPosition Sets the position of a light to project a real-time shadow
Attachment functions
AddAttachment Load a new model from a file and attaches it to a specified bone of this actor
RemoveAttachment Permanently removes a specified attachment from this actor
GetAttachment Gets a reference to a specified attachment object
Animation management
MergeAnims Loads animations from X file
UnloadAnim Unload specified named animation from memory
Mesh related functions (deprecated)
HideMesh Hides a specified part (mesh) of this actor
ShowMesh Shows a specified part (mesh) of this actor
AddMesh Load a new model from a file and attaches it to a specified bone of this actor
RemoveMesh Permanently removes a specified mesh from this actor
Предметы инвентаря
TakeItem Добавляет предмет в инвентарь.
DropItem Удаляет предмет из инвентаря.
GetItem Возвращает ссылку на предмет инвентаря.
HasItem Выясняет, есть ли в инвентаре объекта (персонажа) указанный предмет.
Функции управления курсором
SetCursor Устанавливает стандартный курсор.
GetCursor Возвращает имя файла спрайта курсора или null, если курсор не задан
GetCursorObject Возвращает ссылку на спрайт курсора (объект) или null, если курсор не задан
RemoveCursor Удаляет стандартный курсор.
HasCursor Выясняет, задан ли стандартный курсор для объекта.
Функции для работы со сценариями
AttachScript Выполняет файл сценария и прикрепляет его к объекту.
DetachScript Выгружает из памяти файл сценария и удаляет его связку с объектом.
IsScriptRunning Выясняет, прикреплён ли указанный файл сценария к объекту.
CanHandleMethod Выясняет, поддерживает ли объект метод с указанным именем.
PlaySound Воспроизводит звук. Если имя файла не указано, воспроизводится прикреплённый на настоящий момент звук (если есть).
PlaySoundEvent Воспроизводит звук и генерирует событие, когда воспроизведение закончится. Если имя файла не указано, воспроизводится прикреплённый на настоящий момент звук (если есть).
StopSound Останавливает воспроизведение звука (если есть).
PauseSound Ставит на паузу воспроизведение звука.
ResumeSound Продолжает воспроизведение после паузы.
IsSoundPlaying Выясняет, воспроизводится ли в настоящий момент звуковой файл.
SetSoundPosition Задаёт текущую позицию для воспроизведения в звуковом файле.
GetSoundPosition Возвращает текущую позицию для воспроизведения в звуковом файле
SetSoundVolume Устанавливает громкость звука.
GetSoundVolume Возвращает значение уровня громкости звука.
LoadSound Инициализирует звук из файла, подготавливая его к воспроизведению.
Звуковые эффекты
SoundFXNone Удаляет любой звуковой эффект, прикреплённый к объекту.
SoundFXEcho Задаёт эффект эха для любого звука, привязанного к объекту.
SoundFXReverb Задаёт эффект реверберации для любого звука, привязанного к объекту.
Обработка событий
ApplyEvent Вызывает указанное событие для объекта.
CanHandleEvent Выясняет, имеет ли объект обработчик для указанного события.
Miscelaneous functions
SkipTo Перемещает объект в указанную точку.
Reset Cancels the action the object was currently performing (like talking, walking etc.).
IsTalking Queries whether the object is currently talking.
StopTalking Cancels object's talking.
Talk Makes the object talk.
StickToRegion Forces this actor/entity to act like it's inside a given region
SetFont Sets font of this object.
GetFont Gets a font assigned to this object.
Particle functions
CreateParticleEmitter Initializes the particle emitter attached to this object.
DeleteParticleEmitter Deletes the particle emitter attached to this object.

Атрибуты

Type (только для чтения) Returns always "actor3d"
Direction The direction the actor is currently facing
DirectionAngle The angle the actor is currently facing, in degrees
Active Specifies whether the object is visible on screen
IgnoreItems Specifies whether the object appears to be non-interactive when an inventory item is used on it
SubtitlesPosRelative Specifies whether the SubtitlesPosX and SubtitlesPosY attributes are relative to default position, or absolute screen coordinates
SubtitlesPosX The X position of speech subtitles (either relative to speaker's position or absolute screen coordinates)
SubtitlesPosY The Y position of speech subtitles (either relative to speaker's position or absolute screen coordinates)
SubtitlesWidth Width of speech subtitles. Set to zero to restore the default behavior.
SubtitlesPosXCenter Specifies if the SubtitlesPosX attribute affects the center of the subtitle or its left side.
ParticleEmitter (только для чтения) Returns the reference to the particle emitter object attached to this object, or null if the emitter haven't been initialized yet
NumAttachments (только для чтения) Returns the number of entities attached to this object.
Name Внутреннее имя объекта.
Caption Заголовок объекта.
AccCaption Специальный заголовок объекта, используемый специальными фукциями движка для людей с ослабленным зрением.
X Координата X объекта.
Y Координата Y объекта.
Height (только для чтения) Возвращает текущую высоту объекта (учитывает масштаб персонажей).
Filename (только для чтения) Возвращает имя файла объекта.
Ready (только для чтения) Возвращает true, если объект в настоящий момент не совершает никакого действия.
Interactive Указывает, должен ли объект реагировать на действия пользователя (быть интерактивным).
SoundPanning Указывает, должен ли звук, воспроизводимый данным объектом, панорамироваться в зависимости от его позиции на экране.
NonIntMouseEvents Указывает, должен ли объект реагировать на события MouseEntry и MouseLeave, даже в том случае, если игра работает в неинтерактивном режиме.
Scale The scale of this character in percent. The scale affects both the character model and its shadow.
PosX The 3D X coordinate of the actor's current position
PosY The 3D Y coordinate of the actor's current position
PosZ The 3D Z coordinate of the actor's current position
Velocity The movement velocity to be used for walking
AngularVelocity The turning velocity to be used for turning
ShadowType Specifies the shadow detail level to be used for this actor (0..none, 1..simple, 2..flat, 3..stencil shadows)
ShadowColor The RGBA color of the real-time shadow cast by this character
Shadow Specified if this character casts shadow (obsolete, use ShadowType)
SimpleShadow Specifies if simple shadow is used instead of real-time one (obsolete, use ShadowType)
DrawBackfaces Specifies whether the 3D model should display also polygons facing away from the camera.
TalkAnimName The name of an animation sequence to be used for talking
WalkAnimName The name of an animation sequence to be used for walking
IdleAnimName The name of an animation sequence to be used for standing still
TurnLeftAnimName The name of an animation sequence to be used for turning left (counter clockwise)
TurnRightAnimName The name of an animation sequence to be used for turning right (clockwise)
TalkAnimChannel The animation channel to be used for playing talking animations.
GoToTolerance Specifies the shortest distance between the actor's current position and its GoTo target (in pixels); If the distance is shorter than this value, GoTo command is ignored.
AnimTransitionTime Specifies the time taken to smoothly transition between two animations (in milliseconds)
DropToFloor Specifies whether the actor is always standing on the ground, no matter what Y coordinate is assigned to it.

Низкоуровневые события

MouseEntry The mouse pointer has been just moved over the object.
MouseLeave The mouse pointer has been just moved away from the object.

GoTo(X, Y)
GoToAsync(X, Y)

Makes the actor walk to a given point.

Параметры

X
The X coordinate of the target walking point
Y
The Y coordinate of the target walking point

Примечания

The GoTo method blocks the script execution until the walking is over, while the GoToAsync method returns immediately.


GoToObject(Entity)
GoToObjectAsync(Entity)

Makes the actor walk to a specified entity.

Параметры

Entity
The entity object the actor should walk and turn to

Примечания

This method utilizes the WalkToX, WalkToY and WalkToDirection properties of the target entity. They can be set directly in SceneEdit.


TurnTo(Direction)
TurnTo(Object)
TurnToAsync(Direction)
TurnToAsync(Object)

Makes actor turn to the given direction or to a given object.

Параметры

Direction
The direction to turn to
Object
The object to turn to

Примечания

The TurnTo method blocks the script execution until the turning is over, while the TurnToAsync method returns immediately. The direction can be one of the following constants: DI_UP, DI_UPRIGHT, DI_RIGHT, DI_DOWNRIGHT, DI_DOWN, DI_DOWNLEFT, DI_LEFT or DI_UPLEFT (those equal to numbers 0 to 7).


TurnToAngle(Angle)
TurnToAngleAsync(Angle)

Makes actor turn to the given angle.

Параметры

Angle
The angle to turn to, in degrees

Примечания

The TurnToAngle method blocks the script execution until the turning is over, while the TurnToAngleAsync method returns immediately.


IsWalking()

Queries whether the actor is currently walking.

Возвращаемое значение

Returns true if the actor is walking.


PlayAnim(AnimName)
PlayAnimAsync(AnimName)

Plays an animation.

Параметры

AnimName
The name of the animation sequence to be played

Возвращаемое значение

Returns true if the animation has been played successfuly.

Примечания

The PlayAnim method blocks the script execution until the animation is over, while the PlayAnimAsync method returns immediately. PlayAnim is equivalent to PlayAnimChannel with channel set to zero.


PlayAnimChannel(Channel, AnimName)
PlayAnimChannelAsync(Channel, AnimName)

Plays an animation in a specified channel.

Параметры

Channel
The channel to be used by this animation (0 - 9)
AnimName
The name of the animation sequence to be played

Возвращаемое значение

Returns true if the animation has been played successfuly.

Примечания

The PlayAnimChannel method blocks the script execution until the animation is over, while the PlayAnimChannelAsync method returns immediately.


StopAnim()

Stops a currently playing animation.

Возвращаемое значение

Returns true if the animation has been stopped successfuly.


StopAnimChannel(Channel)

Stops a currently playing animation in the specified channel.

Параметры

Channel
The channel in which the animation should be stopped (0 - 9)

Возвращаемое значение

Returns true if the animation has been stopped successfuly.


IsAnimPlaying(AnimName)

Checks whether the actor is currently playing an animation

Параметры

AnimName
Optional animation name to be queried

Возвращаемое значение

Returns true if the actor is playing an animation.

Примечания

If you don't specify an animation name, this method checks if any animaton is playing. Otherwise it checks if the specified animation is playing.


IsAnimChannelPlaying(Channel, AnimName)

Checks whether the actor is currently playing an animation in a specified channel

Параметры

Channel
The channel in which the animation should be queried (0 - 9)
AnimName
Optional animation name to be queried

Возвращаемое значение

Returns true if the actor is playing an animation in a specified channel.

Примечания

If you don't specify an animation name, this method checks if any animaton is playing. Otherwise it checks if the specified animation is playing.


SetAnimTransitionTime(AnimFrom, AnimTo, Time)

Sets a transition time for an animation pair

Параметры

AnimFrom
The original animation
AnimTo
The new animation
Time
The transition time

Возвращаемое значение

Returns true if the method succeeded.

Примечания

For example, if you want to set the transition from walking to idle animation to 1 second, you'd call: actor.SetAnimTransitionTime("walk", "idle", 1000); Specify a negative Time value to restore the default transition time.


GetAnimTransitionTime(AnimFrom, AnimTo)

Queries a transition time for an animation pair

Параметры

AnimFrom
The original animation
AnimTo
The new animation

Возвращаемое значение

Returns the transition time for the specified animation pair, or a negative value if no transition time is defined.


SkipTo3D(X, Y, Z)

Moves the actor to a specified point in 3D space

Параметры

X
The X coordinate
Y
The Y coordinate
Z
The Z coordinate

SetTexture(MaterialName, TextureFilename)

Assigns a new texture to a specified material

Параметры

Material
The material whose texture should be set
TextureFilename
The filename of a new texture

Примечания

MaterialName defaults to the name of the original texture assigned to the model, without extension. For example, if the model uses texture called "path\some_texture.png", the material will be called "some_texture". TextureFilename can be either a static image or WME sprite.


DirectWalk(Velocity, Animation)

Makes the character walk forward.

Параметры

Velocity
The walking velocity to be used (optional, defaults to standard velocity)
Animation
The animation to be used (optional, defaults to standard animation)

DirectWalkBack(Velocity, Animation)

Makes the character walk backwards.

Параметры

Velocity
The walking velocity to be used (optional, defaults to standard velocity)
Animation
The animation to be used (optional, defaults to standard animation)

DirectWalkStop()

Stops character from walking.


DirectTurnLeft(Velocity, Animation)

Makes the character turn counter-clockwise.

Параметры

Velocity
The turning velocity to be used (optional, defaults to standard velocity)
Animation
The animation to be used (optional, defaults to standard animation)

DirectTurnRight(Velocity, Animation)

Makes the character turn clockwise.

Параметры

Velocity
The turning velocity to be used (optional, defaults to standard velocity)
Animation
The animation to be used (optional, defaults to standard animation)

DirectTurnStop()

Stops character from turning.


SetShadowImage(Filename)

Sets and image to be used as a simple shadow for this actor

Параметры

Filename
The filename of an image to be used

Возвращаемое значение

Returns true if the image has been successfuly set.


GetShadowImage()

Gets the currently assigned image to be used as a simple shadow for this actor

Возвращаемое значение

Returns the filename of currently assigned shadow image or null if no image is set.


SetLightPosition(X, Y, Z)

Sets the position of a light to project a real-time shadow

Параметры

X
The X coordinate of the light
Y
The Y coordinate of the light
Z
The Z coordinate of the light

Примечания

The light position is relative to actor's position.


AddAttachment(Filename, AttachmentName, ParentBone)

Load a new model from a file and attaches it to a specified bone of this actor

Параметры

Filename
Filename of the model file to be loaded (X file)
AttachmentName
The name of the attachment to be loaded
ParentBone
The name of the bone the loaded mesh will be attached to

Возвращаемое значение

Returns true if the attachment has been successfuly loaded and attached.


RemoveAttachment(AttachmentName)

Permanently removes a specified attachment from this actor

Параметры

AttachmentName
The attachment to be removed

Возвращаемое значение

Returns true if the attachment has been successfuly removed.


GetAttachment(AttachmentName)

Gets a reference to a specified attachment object

Параметры

AttachmentName
The attachment to be queried

Возвращаемое значение

Returns a reference to an attachment object or null if there's no attachment with a specified name.


MergeAnims(ModelName)

Loads animations from X file

Параметры

ModelName
The name of an X model whose animations should be loaded

Возвращаемое значение

Returns true if the animations have been successfuly merged.


UnloadAnim(AnimationName)

Unload specified named animation from memory

Параметры

AnimationName
The name of the animation to be unloaded

Возвращаемое значение

Returns true if the animation has been successfuly removed.


HideMesh(MeshName)

Hides a specified part (mesh) of this actor

Параметры

MeshName
The mesh to be hidden

Возвращаемое значение

Returns true if the mesh has been successfuly hidden.

Примечания

This method is DEPRECATED and not supported by .X models.


ShowMesh(MeshName)

Shows a specified part (mesh) of this actor

Параметры

MeshName
The mesh to be shown

Возвращаемое значение

Returns true if the mesh has been successfuly shown.

Примечания

This method is DEPRECATED and not supported by .X models.


AddMesh(Filename, MeshName, ParentBone)

Load a new model from a file and attaches it to a specified bone of this actor

Параметры

Filename
Filename of the model file to be loaded (MS3D file)
MeshName
The name of the mesh to be loaded
ParentBone
The name of the bone (joint) the loaded mesh will be attached to

Возвращаемое значение

Returns true if the mesh has been successfuly loaded and attached.

Примечания

This method is DEPRECATED and not supported by .X models.


RemoveMesh(MeshName)

Permanently removes a specified mesh from this actor

Параметры

MeshName
The mesh to be removed

Возвращаемое значение

Returns true if the mesh has been successfuly removed.

Примечания

This method is DEPRECATED and not supported by .X models.


TakeItem(ItemName, InsertAfter)

Добавляет предмет в инвентарь.

Параметры

ItemName
Имя предмета.
InsertAfter
Имя предмета, после которого следует вставить данный предмет (необязательный параметр).

DropItem(ItemName)

Удаляет предмет из инвентаря.

Параметры

ItemName
Имя предмета.

GetItem(ItemIndex)
GetItem(ItemName)

Возвращает ссылку на предмет инвентаря.

Параметры

ItemIndex
Индекс взятого предмета.
ItemName
Имя предмета.

Возвращаемое значение

Ссылка на объект item в инвентаре.


HasItem(ItemName)
HasItem(ItemObject)

Выясняет, есть ли в инвентаре объекта (персонажа) указанный предмет.

Параметры

ItemName
Имя предмета.
ItemObject
Ссылка на предмет (объект item).

Возвращаемое значение

Если указанный предмет есть в инвентаре объекта (персонажа), метод вернёт true.

Примечания

Следует обратить внимание, что данный метод ищет предмет в инвентаре только текущего объекта (персонажа), если Вам нужно просмотреть все существующие инвентари, используйте метод Game.IsItemTaken().


SetCursor(Filename)

Устанавливает стандартный курсор.

Параметры

Filename
Имя файла спрайта, который будет использоваться в качестве указателя.

Возвращаемое значение

Возвращает true в случае успеха.


GetCursor()

Возвращает имя файла спрайта курсора или null, если курсор не задан


GetCursorObject()

Возвращает ссылку на спрайт курсора (объект) или null, если курсор не задан


RemoveCursor()

Удаляет стандартный курсор.


HasCursor()

Выясняет, задан ли стандартный курсор для объекта.

Возвращаемое значение

Возвращает true, если для объекта задан свой собственный стандартный курсор.


AttachScript(Filename)

Выполняет файл сценария и прикрепляет его к объекту.

Параметры

Filename
Имя файла сценария.

Возвращаемое значение

Возвращает true, если сценарий был успешно выполнен.

Примечания

К каждому объекту WME можно прикреплять несколько сценариев.


DetachScript(Filename, KillThreads)

Выгружает из памяти файл сценария и удаляет его связку с объектом.

Параметры

Filename
Имя файла сценария.
KillThreads
Указывает, нужно ли выгружать из памяти всё запущенные экземляры (threads) этого сценария (необязательный параметр, по умолчанию = false)

Возвращаемое значение

В случае удачного выполнения, метод вернёт значение true.

Примечания

Экземпляры сценария (threads) - это исполняемые в настоящий момент обработчики событий и методы, которые тем или иным образом включают в себя выполнение данного сценария.


IsScriptRunning(Filename)

Выясняет, прикреплён ли указанный файл сценария к объекту.

Параметры

Filename
Имя файла сценария.

Возвращаемое значение

Возвращает true, если указанный сценарий прикреплён к объекту.


CanHandleMethod(MethodName)

Выясняет, поддерживает ли объект метод с указанным именем.

Параметры

MethodName
Название метода.

Возвращаемое значение

Возвращает true, если объект поддерживает метод с указанным именем.


PlaySound(Filename, Looping, LoopStart)
PlaySound(Looping, LoopStart)

Воспроизводит звук. Если имя файла не указано, воспроизводится прикреплённый на настоящий момент звук (если есть).

Параметры

Filename
Имя звукового файла
Looping
Указывает, нужно ли зациклить воспроизведение звука (необязательный параметр, по умолчанию = false).
LoopStart
Позиция в мс, с которой будет начинаться воспроизведение при включённом зацикливании (необязательный параметр, по умолчанию = 0).

Возвращаемое значение

В случае удачного выполнения, метод вернёт значение true.


PlaySoundEvent(Filename, EventName)
PlaySoundEvent(EventName)

Воспроизводит звук и генерирует событие, когда воспроизведение закончится. Если имя файла не указано, воспроизводится прикреплённый на настоящий момент звук (если есть).

Параметры

Filename
Имя звукового файла
EventName
Имя события, которое будет сгенерировано после окончания воспроизведения звука.

Возвращаемое значение

В случае удачного выполнения, метод вернёт значение true.


StopSound()

Останавливает воспроизведение звука (если есть).

Возвращаемое значение

В случае удачного выполнения, метод вернёт значение true.


PauseSound()

Ставит на паузу воспроизведение звука.

Возвращаемое значение

В случае удачного выполнения, метод вернёт значение true.


ResumeSound()

Продолжает воспроизведение после паузы.

Возвращаемое значение

В случае удачного выполнения, метод вернёт значение true.


IsSoundPlaying()

Выясняет, воспроизводится ли в настоящий момент звуковой файл.

Возвращаемое значение

Если звук воспроизводится, метод вернёт true.


SetSoundPosition(Time)

Задаёт текущую позицию для воспроизведения в звуковом файле.

Параметры

Time
Новая позиция в мс

Возвращаемое значение

В случае удачного выполнения, метод вернёт значение true.


GetSoundPosition()

Возвращает текущую позицию для воспроизведения в звуковом файле

Возвращаемое значение

Позиция в мс.


SetSoundVolume(Volume)

Устанавливает громкость звука.

Параметры

Volume
Уровень громкости в процентах.

Возвращаемое значение

В случае удачного выполнения, метод вернёт значение true.


GetSoundVolume()

Возвращает значение уровня громкости звука.

Возвращаемое значение

Текущий уровень громкости в процентах.


LoadSound(Filename)

Инициализирует звук из файла, подготавливая его к воспроизведению.

Параметры

Filename
Имя звукового файла.

Возвращаемое значение

В случае удачного выполнения, метод вернёт значение true.

Примечания

Этот метод используется для кэширования звуковых файлов. Инициализация звука занимает некоторое время, поэтому желательно разместить её в стартовом сценарии сцены, чтобы метод PlaySound не замедлял игру. Для этой цели и служит метод LoadSound. Чтобы воспроизвести кэшированный звук, нужно просто вызвать метод PlaySound без указания имени файла, например, SomeObject.PlaySound(false);


SoundFXNone()

Удаляет любой звуковой эффект, прикреплённый к объекту.


SoundFXEcho(WetDryMix, Feedback, LeftDelay, RightDelay)

Задаёт эффект эха для любого звука, привязанного к объекту.

Параметры

WetDryMix
Микс влажность/сухость, в процентах (0 - 100)
Feedback
Обратная отдача, в процентах (0 - 100)
LeftDelay
Задержка слева, в мс (1 - 2000)
RightDelay
Задержка справа, в мс (1 - 2000)

Примечания

Пример: actor.SoundFXEcho(50, 50);


SoundFXReverb(InGain, ReverbMix, ReverbTime, HighFreqRTRatio)

Задаёт эффект реверберации для любого звука, привязанного к объекту.

Параметры

InGain
Прирост, в дБ (-96 - 0)
ReverbMix
Реверберация, в дБ (-96 - 0)
ReverbTime
Время реверберации, в мс (0.001 - 3000)
HighFreqRTRatio
Коэффициент высоких частот (0.001 - 0.999)

Примечания

Пример: actor.SoundFXReverb(0, 0, 2000);


ApplyEvent(EventName)

Вызывает указанное событие для объекта.

Параметры

EventName
Имя события.

Возвращаемое значение

Возвращает true, если событие было вызвано успешно.


CanHandleEvent(EventName)

Выясняет, имеет ли объект обработчик для указанного события.

Параметры

EventName
Имя события.

Возвращаемое значение

Возвращает true, если объект может обрабатывать запрашиваемое событие.


SkipTo(X, Y)

Перемещает объект в указанную точку.

Параметры

X
Координата X.
Y
Координата Y.

Reset()

Cancels the action the object was currently performing (like talking, walking etc.).


IsTalking()

Queries whether the object is currently talking.

Возвращаемое значение

Returns true if the object is talking.


StopTalking()

Cancels object's talking.

Примечания

You can also use StopTalk() abbreviation.


Talk(Text, SoundFilename, Duration, TalkStances, TextAlignment)
TalkAsync(Text, SoundFilename, Duration, TalkStances, TextAlignment)

Makes the object talk.

Параметры

Text
A text to be used as a talk subtitle
SoundFilename
A filename of a sound file to be used (oprtional, default is no sound)
Duration
A subtitle duration in milliseconds (optional, default is 0)
TalkStances
A comma separated list of talk "stances" to be used for the talking (optional, default is random stances)
TextAlignment
A text alignment for the subtitle (0-left, 1-right, 2-center) (optional, default=2)

Примечания

Talk method blocks the script execution until the animation is over, while the TalkAsync method returns immediately. If the duration is set to zero, it's calculated automatically either from the sound file or from the length of the subtitle.


StickToRegion(Region)
StickToRegion(RegionName)

Forces this actor/entity to act like it's inside a given region

Параметры

Region
Reference to a scene region object
RegionName
Name of a scene region

Примечания

Use this method to "lock" a z-order value of an actor or an entity.


SetFont(Filename)

Sets font of this object.

Параметры

Filename
The name of the font to be set.

Возвращаемое значение

If the method succeeds, the return value is true.


GetFont()

Gets a font assigned to this object.

Возвращаемое значение

Returns the filename of currently assigned font.


CreateParticleEmitter()

Initializes the particle emitter attached to this object.

Возвращаемое значение

Returns the reference to the particle emitter object

Примечания

Once initialized with this method, the particle emitter object can be queried using the ParticleEmitter property.


DeleteParticleEmitter()

Deletes the particle emitter attached to this object.

Возвращаемое значение

Returns true if the method succeeded.