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

See also

  1. Creation rules of dialogues
  2. Event OnUnitTalk
  3. General procedures and functions
Личные инструменты