home *** CD-ROM | disk | FTP | other *** search
/ Micromanía 85 / CDMM85_1.ISO / Monopoly Tycoon / MTycoonDemo.exe / data1.cab / scripts / TUTORIAL11 / hub.lua
Encoding:
Text File  |  2001-10-24  |  5.2 KB  |  134 lines

  1. PromptHeading = ID_TUTORIAL_11_OFFSET + 1
  2. g_currentprompt = 0;
  3. g_counter = 0;
  4. Tweaks.numyearsin24hours = 0;
  5.  
  6. -------------------------------------------------------------------------------------------------
  7. -- INITIALISE_Level. Standard level event
  8. -------------------------------------------------------------------------------------------------
  9. function EVENTINITIALISE_Level()
  10. --    Game.Pause();
  11.     -- load the building and business file
  12.     C_RunScript("scripts\\maps\\tempmap.lua");
  13. end;
  14.  
  15. -------------------------------------------------------------------------------------------------
  16. -- Level. Standard level event.
  17. -------------------------------------------------------------------------------------------------
  18. function EVENT_Level()
  19.     -- create an initial prompt
  20.     C_TriggerEvent("BlockCam", 1, PACIFIC_AVENUE);
  21.     -- Game.Unpause();
  22.     Interface.DisableAllControls();
  23.     C_TriggerEvent("SetPlanView", 1);
  24.     -- create the initial prompt
  25.     CreatePrompt(1);
  26. end;
  27.  
  28. function CATCHEVENT_InterfacePromptDismiss(a)
  29.     CreatePrompt(a);
  30. end;
  31.  
  32. function CATCHEVENT_TutorialEvent(a)
  33.  
  34.     if g_currentprompt == 11 then
  35.         Interface.DismissPrompt();
  36.         Interface.DisableAll3DPicking();
  37.     end;
  38.  
  39.     if g_currentprompt == 10 then
  40.         Interface.DismissPrompt();
  41.         Interface.DisableAll3DPicking();
  42.     end;
  43.  
  44.     if g_currentprompt == 9 then
  45.         Interface.DismissPrompt();
  46.         Interface.DisableAll3DPicking();
  47.     end;
  48.  
  49.     if g_currentprompt == 4 then
  50.         Interface.DismissPrompt();
  51.         Interface.DisableControl(TUT_MPP_INFOBUTTON_2);
  52.     end;
  53.  
  54.     if g_currentprompt == 2 then
  55.         Interface.DismissPrompt();
  56.         Interface.DisableAll3DPicking();
  57.     end;
  58. end;
  59.  
  60.  
  61. function CATCHEVENT_Picked3D(a)
  62.  
  63.     if g_currentprompt == 11 then
  64.         Interface.DismissPrompt();
  65.         Interface.DisableControl(TUT_NAVIGATOR_PANEL);
  66.         Interface.DisableAll3DPicking();
  67.     end;
  68.  
  69.     if g_currentprompt == 10 then
  70.         Interface.DismissPrompt();
  71.         Interface.DisableAll3DPicking();
  72.     end;
  73.  
  74.  
  75.     if g_currentprompt == 9 then
  76.         Interface.DismissPrompt();
  77.         Interface.DisableAll3DPicking();
  78.     end;
  79.  
  80.     if a == 1 and g_currentprompt == 2 then
  81.         Interface.DismissPrompt();
  82.         Interface.DisableAll3DPicking();
  83.     end;
  84. end;
  85.  
  86. -- prompt manager
  87. function CreatePrompt(a)
  88.     g_currentprompt = a;
  89.     body = a+PromptHeading;
  90.     if a == 1 then
  91.         Interface.CreatePrompt(PromptHeading,body, a+1); --"Okay. Let's look at the Railroad Stations.", a+1);
  92.     elseif a == 2 then
  93.         Interface.CreateMessage(PromptHeading,body, a+1); --"Double click the B&O Railroad.", a+1);
  94.         Interface.EnableBlockPicking(B_O_RAILROAD);
  95.         Interface.AddArrow(403, 72);
  96.     elseif a == 3 then
  97.         Interface.CreatePrompt(PromptHeading,body, a+1); --"Money comes in from two different sources. First is the set daily income from freight. This is guaranteed to each of the stations. Secondly are the passenger ticket sales.", a+1);
  98.         Interface.AddArrow(189, 191);
  99.     elseif a == 4 then
  100.         Interface.CreateMessage(PromptHeading,body, a+1); --"Anyone who cannot find a place to live in the city will commute in through one of the four Railroad stations. If you own the lease on that Railroad Station, you will collect their ticket money.", a+1);
  101.         Interface.EnableControl(TUT_MPP_INFOBUTTON_2);
  102.         Interface.AddArrow(73,52);
  103.     elseif a == 5 then
  104.         Interface.CreatePrompt(PromptHeading,body, a+1); --"Anyone who cannot find a place to live in the city will commute in through one of the four Railroad stations. If you own the lease on that Railroad Station, you will collect their ticket money.", a+1);
  105.     elseif a == 6 then
  106.         Interface.CreatePrompt(PromptHeading,body, a+1); --"In the evening they will leave the city, paying again before they travel.", a+1);
  107.     elseif a == 7 then
  108.         Interface.CreatePrompt(PromptHeading,body, a+1); --"You will also see tourists coming into the city through the Railroads; so building businesses that would suit these people nearby would be a good idea - once you've collected their fare of course.", a+1);
  109.     elseif a == 8 then
  110.         Interface.CreatePrompt(PromptHeading,body, a+1); --"You will also see tourists coming into the city through the Railroads; so building businesses that would suit these people nearby would be a good idea - once you've collected their fare of course.", a+1);
  111.     elseif a == 9 then
  112.         Interface.CreatePrompt(PromptHeading,body, a+1); --"The other Railroads are Pennsylvania...", a+1);
  113.         Interface.EnableControl(TUT_NAVIGATOR_PANEL);
  114.         Interface.EnableBlockPicking(PENSYLVANIA_RAILROAD);
  115.         Interface.AddArrow(611, 395);
  116.     elseif a == 10 then
  117.         Interface.CreatePrompt(PromptHeading,body, a+1); --"...Reading Railroad...", a+1);
  118.         Interface.EnableControl(TUT_NAVIGATOR_PANEL);
  119.         Interface.EnableBlockPicking(READING_RAILROAD);
  120.         Interface.AddArrow(579, 435);
  121.     elseif a == 11 then
  122.         Interface.CreatePrompt(PromptHeading,body, a+1); --"and finally Shortline Railroad.", a+1);
  123.         Interface.EnableControl(TUT_NAVIGATOR_PANEL);
  124.         Interface.EnableBlockPicking(SHORTLINE_RAILROAD);
  125.         Interface.AddArrow(545, 393);
  126.     elseif a == 12 then
  127.         Interface.CreatePrompt(PromptHeading,body, a+1); --"Once again, the more Railroads that you control at one time, the more your daily income will be, so do what you can to collect them all!", a+1);
  128.     elseif a == 13 then
  129.         Game.End(true);
  130.     end;
  131. end;
  132.  
  133.  
  134.