En:OnUnitTalk
Материал из Pocket Fallout для КПК на PDA PC PPC Mobile.
Содержание |
[править]
Syntax
procedure OnUnitTalk(unit_name : String)
[править]
Description
Called when talking window is created. Using this method developer can set answer to hero.
[править]
Parameters
- unit_name - string. Unit name with which hero is talking now;
[править]
Result
The procedure returns nothing.
[править]
Example
procedure OnUnitTalk(unit_name)
var bot = CreateObject("MapObject");
var is_exist = bot.GetObjectByName(unit_name);
if not is_exist then
bot.Free();
return
endif
if unit_name == "roma" then
if bot.GetCurrentTalkID() == 100 then
AddAnswer(101, unit_name);
AddAnswer(102, unit_name);
AddAnswer(103, unit_name);
endif
bot.Free();
endprocedure
[править]