En:AddAnswer
Материал из Pocket Fallout для КПК на PDA PC PPC Mobile.
Содержание |
[править]
Syntax
AddAnswer(identifier : Number, unit_name : String)
[править]
Description
Add answer to the talking window for unit named <unit_name>;
[править]
Parameters
- identifier - number. Answer string identifier from the file dialog_<unit_name>.txt;
- unit_name - string. Unit identifier with which the unit talks;
[править]
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 - 1;
endif
if unit_name == "roma" then
if bot.GetCurrentTalkID() == 100 then
AddAnswer(101, unit_name);
AddAnswer(102, unit_name);
AddAnswer(103, unit_name);
endif
endif
bot.Free();
endprocedure
[править]