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

  1. PromptHeading = ID_TUTORIAL_2_OFFSET + 1; --"The Three Views"
  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.     Interface.DisableAllControls();
  22.     Interface.DisableAll3DPicking();
  23.     Interface.DisableCameraControl();
  24.     C_TriggerEvent("SetPlanView", 1);
  25.     -- create the initial prompt
  26.     CreatePrompt(1);
  27. end;
  28.  
  29. function CATCHEVENT_InterfacePromptDismiss(a)
  30.     CreatePrompt(a);
  31. end;
  32.  
  33. function CATCHEVENT_TutorialEvent(a)
  34.  
  35.     if g_currentprompt == 11 then
  36.         Interface.DismissPrompt();
  37.         Interface.DisableControl(TUT_NAVIGATOR_PANEL);
  38.         Interface.DisableControl(TUT_MPP_GREENBUTTON_6);
  39.         Interface.DisableAll3DPicking();
  40.     end;
  41.  
  42.     if g_currentprompt == 4 then
  43.         Interface.DismissPrompt();
  44.         Interface.DisableControl(TUT_TOGGLE_VIEW);
  45.     end;
  46.  
  47. end;
  48.  
  49. function CATCHEVENT_Picked3D(a)
  50.  
  51.     if g_currentprompt == 11 then
  52.         Interface.DismissPrompt();
  53.         Interface.DisableAll3DPicking();
  54.     end;
  55.  
  56.     if g_currentprompt == 7 then
  57.         Interface.DismissPrompt();
  58.         Interface.DisableAll3DPicking();
  59.     end;
  60.  
  61.     if a == 1 and g_currentprompt == 5 then
  62.         Interface.DismissPrompt();
  63.         Interface.DisableAll3DPicking();
  64.     end;
  65.  
  66. end;
  67.  
  68. -- prompt manager
  69. function CreatePrompt(a)
  70.     g_currentprompt = a;
  71.     body = a+PromptHeading;
  72.     if a == 1 then
  73.         Interface.CreatePrompt(PromptHeading,body, a+1); --"There are three main views that you need to know about. This is the Strategic View...", a+1);
  74.     elseif a == 2 then
  75.         Interface.CreatePrompt(PromptHeading,body, a+1); --"This is the Block View...", a+1);
  76.         Camera.SetCityView();
  77.         Camera.SetMode(BLOCKCAM, INDIANA_AVENUE);
  78.     elseif a == 3 then
  79.         Interface.CreatePrompt(PromptHeading,body, a+1); --"And this is the Business View...", a+1);
  80.         Camera.SetMode(BUILDINGCAM, 0);
  81.     elseif a == 4 then
  82.         Interface.CreateMessage(PromptHeading,body, a+1); --"Here's how to get to the Strategic View. Click the 'Compass Button'.", a+1);
  83.         Interface.AddArrow( 534, 461 );
  84.         Interface.EnableControl(TUT_TOGGLE_VIEW);
  85.     elseif a == 5 then
  86.         Interface.CreateMessage(PromptHeading,body, a+1); --"Good. We could jump straight back to where we were by clicking the same button again, but we can also double click any of the blocks. Try it on Indiana Avenue.", a+1);
  87.         Interface.PositionPrompt(0, 150);
  88.         Interface.AddArrow( 323, 105 );
  89.         Interface.EnableBlockPicking(INDIANA_AVENUE);
  90.     elseif a == 6 then
  91.         Interface.CreatePrompt(PromptHeading,body, a+1); -- "Great. You now have Indiana Avenue selected. All the information in the panel is about this block.", a+1);
  92.         Interface.PositionPrompt(0, 0);
  93.         Interface.AddArrow(190, 27);
  94.     elseif a == 7 then
  95.         Interface.CreateMessage(PromptHeading,body, a+1); --"With a block selected you can now select any of the buildings on it. Try clicking on one.", a+1);
  96.         Interface.PositionPrompt(0,-100);
  97.         Interface.EnableBuildingPicking();
  98.     elseif a == 8 then
  99.         Interface.CreatePrompt(PromptHeading,body, a+1); --"Good. Now, with a building selected, the panel displays information about the building.", a+1);
  100.         Interface.AddArrow(190, 27);
  101.     elseif a == 9 then
  102.         Interface.CreatePrompt(PromptHeading,body, a+1); --"You can get back to the Block selection in a number of ways. You could click the 'Go To Block button'...", a+1);
  103.         Interface.AddArrow( 29, 288 );
  104.     elseif a == 10 then
  105.         Interface.CreatePrompt(PromptHeading,body, a+1); --"You could select the Block in the Navigator...", a+1);
  106.         Interface.AddArrow( 560, 372);
  107.         g_counter = 0;
  108.     elseif a == 11 then
  109.         Interface.CreateMessage(PromptHeading,body, a+1); --"Or you could click on the pavement of the block. Use one of these methods to go back to the Block View.", a+1);
  110.         Interface.EnableBlockPicking(INDIANA_AVENUE);
  111.         Interface.EnableControl(TUT_NAVIGATOR_PANEL);
  112.         Interface.EnableControl(TUT_MPP_GREENBUTTON_6);
  113.     elseif a == 12 then
  114.         Interface.CreatePrompt(PromptHeading,body, a+1); --"You now know about the three main views.", a+1);
  115.     elseif a == 13 then
  116.         Game.End(true);
  117.     end;
  118. end;
  119.  
  120.  
  121.