---++!! !headon_speech %TOC{title="Contents:"}% %STARTINCLUDE% ---++ displaying head on speech on character | *Title* | displaying head on speech on character | | *Author(s)* | LiXizhi | | *Date* | 2006/9/5 | | *File* | script/ide/headon_speech.lua | ---+++ Description global AI related functions. ---+++ Member Functions ---++++ !headon_speech.GetLastSpeechOfChar return the last spoken text of a given character, it may return nil,if the character does not speak anything. it will search in all logged text __syntax__ <verbatim>function headon_speech.GetLastSpeechOfChar(charName)</verbatim> __parameters__ | *charName* | | ---++++ !headon_speech.Speek [[ display a simple 3D text on the head of a given character for a given seconds. * _param_ __charName__ : character name, to which the text is attached.it first searches the global object, if not found, it will search the OPC list. * _param_ __text__ : the text to be displayed on the head of the character. if nil, displays nothing. if it is pure text, it will displayed using centered text control or it may contains any static MCML tags, in which case it will be rendered as interactive mcml elements. such as "<a>href links</a>" * _param_ __nLifeTime__ : number of seconds the text maintains on the head of the character. if -1, it will be permanent. if 0 and text is "", it will remove head on text. ]] __syntax__ <verbatim>function headon_speech.Speek(charName, text, nLifeTime)</verbatim> __parameters__ | *charName* | character name, to which the text is attached.it first searches the global object, if not found, it will search the OPC list. | | *text* | | | *nLifeTime* | number of seconds the text maintains on the head of the character. if -1, it will be permanent. if 0 and text is "", it will remove head on text. ]] | ---++++ !headon_speech.OnDialogBoxFrameMove if mouse cursor is over the control, we will prolong the life time __syntax__ <verbatim>function headon_speech.OnDialogBoxFrameMove(sCtrlName)</verbatim> __parameters__ | *sCtrlName* | | ---++++ !headon_speech.GetNextSpeechGUIName [private]get next free speech GUI name, auto increase the ID. * _param_ __nID__ : if nil, headon_speech.nNextID is used. __syntax__ <verbatim>function headon_speech.GetNextSpeechGUIName(nID)</verbatim> __parameters__ | *nID* | if nil, headon_speech.nNextID is used. | ---++++ !headon_speech.GetAsset automatically called when script is loaded. However, if the application restarts, remember to call before using the ChangeHeadMark() functions. __syntax__ <verbatim>function headon_speech.GetAsset(key)</verbatim> __parameters__ | *key* | | ---++++ !headon_speech.ChangeHeadMark [[ change the models which are displayed on the head of the given character * _param_ __charName__ : If nil or "", it is current player. the character on whose head the model is attached.it first searches the global object, if not found, it will search the OPC list. * _param_ __markName__ : the mark name, such as "arrow", "quest", "claim", "summon". It should be a field in headon_speech.Assets. if this is nil or "", the mark is removed from the head of the character. ]] __syntax__ <verbatim>function headon_speech.ChangeHeadMark(charName, markName)</verbatim> __parameters__ | *charName* | If nil or "", it is current player. the character on whose head the model is attached.it first searches the global object, if not found, it will search the OPC list. | | *markName* | | %STOPINCLUDE%
E
dit
|
A
ttach
|
P
rint version
|
H
istory
: r1
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r1 - 2008-02-29
-
LiXizhi
Home
Site map
CCWeb web
HaqiTeen web
Main web
ParaEngine web
TWiki web
Main Web
Users
Groups
Index
Search
Changes
Notifications
RSS Feed
Statistics
导航页WebTopMenu
Preferences
开发指南
Getting Started
ParacraftSDK
NPL
MCML
NPL Reference Manual
美术Mod
Account
Log In
English
简体中文
簡體中文
E
dit
A
ttach
Copyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback