headon_speech
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
function headon_speech.GetLastSpeechOfChar(charName)
parameters
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 "
href links"
- 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
function headon_speech.Speek(charName, text, nLifeTime)
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
function headon_speech.OnDialogBoxFrameMove(sCtrlName)
parameters
headon_speech.GetNextSpeechGUIName
[private]get next free speech GUI name, auto increase the ID.
- param nID : if nil, headon_speech.nNextID is used.
syntax
function headon_speech.GetNextSpeechGUIName(nID)
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
function headon_speech.GetAsset(key)
parameters
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
function headon_speech.ChangeHeadMark(charName, markName)
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 |
|