LuaEvents.TryQueueTutorial (Civ5 API)

From Civilization Modding Wiki
Revision as of 20:43, 19 September 2012 by DonQuich (talk | contribs) (Bot update)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

This page is a part of the Lua and UI Reference (Civ5).


Function.png This function is a member of LuaEvents.

This is a static method, invoke it with a dot.


Usage

void LuaEvents.TryQueueTutorial(string tutorialID, bool highPriority)


Event Type

Regular event: you can subscribe to it through LuaEvents.TryQueueTutorial.Add(<function handler>) or invoke it directly through LuaEvents.TryQueueTutorial(<arguments list>).

Parameters

tutorialID: No description available.
highPriority: No description available.


Source code samples

Redundant occurences have been removed.

CityView.lua

UI/InGame/CityView/CityView.lua
1673
LuaEvents.TryQueueTutorial("CITY_SCREEN", true);


TradeLogic.lua

UI/InGame/WorldView/TradeLogic.lua
0492
LuaEvents.TryQueueTutorial("DIPLO_TRADE_SCREEN", true);


TutorialEngine.lua

Tutorial/TutorialEngine.lua
0659
LuaEvents.TryQueueTutorial.Add(function(tutorialID, highPriority)
0660
--print("Trying to queue a tutorial");
0661
for i,v in ipairs(TutorialInfo) do
0662
   if(v.ID == tutorialID) then
0663
   if(CanQueueTutorial(v)) then
0664
   if(highPriority ~= nil) then
0665
   QueueTutorial(v);
0666
   ProcessActiveTutorialQueue();
0667
   else
0668
   local bWasEmpty = #g_ActiveTutorialQueue == 0;
0670
   QueueTutorial(v);
0671
   if(bWasEmpty) then
0672
   ProcessActiveTutorialQueue();
0673
   end
0674
   end
0675
   end
0676
   break;
0677
   end
0678
   end
0679
   end);



The initial version of this page was created by the Civ5 API Bot, see the Civ5 API Reference FAQ. Some of the texts come from the 2kgames' wiki and most of code samples are copyrighted to Firaxis.
Functions' signatures were either copied from the 2kgames' wiki, or infered from the Lua source files and the binaries. Errors are possible.
Contributors may find help in the Contributors guide to the Civ5 API.