Advertisement
ZoriaRPG

Zelda 3 Follower v0.9

Apr 10th, 2019
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 16.08 KB | None | 0 0
  1. import "std.zh"
  2. import "classic.zh"
  3.  
  4. /////////////////////////////
  5. /// Zelda 3 Follower      ///
  6. /// v0.9                  ///
  7. /// 10th April, 2019      ///
  8. /// By: ZoriaRPG          ///
  9. /// Made for: JudasRising ///
  10. /////////////////////////////
  11. // v0.1 : Initial
  12. // v0.2 : Changed hardcoded > 3 frame cap to use FOLLOWER_MAX_FRAME in drawing loops.
  13. // v0.3 : Fix scrolling positions and positions onContinue
  14. // v0.4 : The follower's tile is now set by the combo of the ffc 'GetZelda'. (It's combo tile, -4.)
  15. //      : Added the ability for the follower to play a message, and give an item to Link, when Link
  16. //      : delivers them to their destination.
  17. //  : Added the ability to show a message when you collect the npc.
  18. // v0.5 : The follower CSet is now set by the ffc when you collect him.
  19. // v0.6 : Renamed scripts and functions, and moved global functions into local functions of ffc script Follower.
  20. // v0.7 : Moved array to be script-namespace local to ffc Follower. Used for 2.55.
  21. //      : You could use this in 2.53, but it needs the included Init script to work, as it will have bugs
  22. //      : (the array values aren't correct) on init in versions < 2.55.
  23. //  : The follower ffc now makes its data invisible on init.
  24. // v0.8 : Added support for up to 10 unique followers in a quest.
  25. // v0.9 : Set combo under follower solid when that follower is dropped off.
  26.  
  27.  
  28. //Settings
  29. const int FOLLOWER_ZELDA_MIDI_DURATION  = 300;
  30. const int FOLLOWER_ZELDA_MIDI       = 1;
  31. const int FOLLOWER_MAX_FRAME        = 3; //4-frame walking animation
  32. const int FOLLOWER_CMB_BLANK_SOLID = 1;
  33.  
  34. //Binary flags for Screen->D
  35. const int FOLLOWER_SHOWED_MESSAGE   = 10b;
  36. const int FOLLOWER_GAVE_ITEM        = 1b;
  37. const int FOLLOWER_DELIVERED        = 100b;
  38. const int FOLLOWER_RESCUED      = 1000b;
  39. const int FOLLOWER_REGISTER         = 1; //Screen->D register to use on any screen where you leave a follower.
  40.  
  41. //Array and array indices.
  42. //int TheFollower[128] = {-1, -1};
  43. const int FOLLOWER_MIDI_TIMER   = 0;
  44. const int FOLLOWER_CUR_RESCUED  = 1;
  45. const int FOLLOWER_ACTIVE   = 2;
  46. const int FOLLOWER_ANIMATING    = 3;
  47. const int FOLLOWER_FRAME    = 4;
  48. const int FOLLOWER_SUBFRAME     = 5;
  49.  
  50. const int FOLLOWER_ORIG_MIDI    = 6;
  51. const int FOLLOWER_BASE_TILE    = 7;
  52. const int FOLLOWER_CSET     = 8;
  53. const int FOLLOWER_CURRENT_ID   = 9;
  54.  
  55.  
  56. const int FOLLOWER_X        = 10;
  57. const int FOLLOWER_X1       = 11;
  58. const int FOLLOWER_X2       = 12;
  59. const int FOLLOWER_X3       = 13;
  60. const int FOLLOWER_X4       = 14;
  61. const int FOLLOWER_X5       = 15;
  62. const int FOLLOWER_X6       = 16;
  63. const int FOLLOWER_X7       = 17;
  64. const int FOLLOWER_X8       = 19;
  65. const int FOLLOWER_X9       = 20;
  66. const int FOLLOWER_X10      = 21;
  67. const int FOLLOWER_X11      = 22;
  68. const int FOLLOWER_X12      = 23;
  69. const int FOLLOWER_X13      = 23;
  70. const int FOLLOWER_X14      = 24;
  71. const int FOLLOWER_X15      = 26;
  72. const int FOLLOWER_X16      = 27;
  73. const int FOLLOWER_X17      = 28;
  74. const int FOLLOWER_X18      = 29;
  75. const int FOLLOWER_X19      = 30;
  76. const int FOLLOWER_X20      = 31;
  77.  
  78. const int FOLLOWER_Y        = 40;
  79. const int FOLLOWER_Y1       = 41;
  80. const int FOLLOWER_Y2       = 42;
  81. const int FOLLOWER_Y3       = 43;
  82. const int FOLLOWER_Y4       = 44;
  83. const int FOLLOWER_Y5       = 45;
  84. const int FOLLOWER_Y6       = 46;
  85. const int FOLLOWER_Y7       = 47;
  86. const int FOLLOWER_Y8       = 48;
  87. const int FOLLOWER_Y9       = 49;
  88. const int FOLLOWER_Y10      = 50;
  89. const int FOLLOWER_Y11      = 51;
  90. const int FOLLOWER_Y12      = 52;
  91. const int FOLLOWER_Y13      = 53;
  92. const int FOLLOWER_Y14      = 54;
  93. const int FOLLOWER_Y15      = 55;
  94. const int FOLLOWER_Y16      = 56;
  95. const int FOLLOWER_Y17      = 57;
  96. const int FOLLOWER_Y18      = 58;
  97. const int FOLLOWER_Y19      = 59;
  98. const int FOLLOWER_Y20      = 60;
  99.  
  100. const int FOLLOWER_DIR      = 70;
  101. const int FOLLOWER_DIR1     = 71;
  102. const int FOLLOWER_DIR2     = 72;
  103. const int FOLLOWER_DIR3     = 73;
  104. const int FOLLOWER_DIR4     = 74;
  105. const int FOLLOWER_DIR5     = 75;
  106. const int FOLLOWER_DIR6     = 76;
  107. const int FOLLOWER_DIR7     = 77;
  108. const int FOLLOWER_DIR8     = 78;
  109. const int FOLLOWER_DIR9     = 79;
  110. const int FOLLOWER_DIR10    = 80;
  111. const int FOLLOWER_DIR11    = 81;
  112. const int FOLLOWER_DIR12    = 82;
  113. const int FOLLOWER_DIR13    = 83;
  114. const int FOLLOWER_DIR14    = 84;
  115. const int FOLLOWER_DIR15    = 85;
  116. const int FOLLOWER_DIR16    = 86;
  117. const int FOLLOWER_DIR17    = 87;
  118. const int FOLLOWER_DIR18    = 88;
  119. const int FOLLOWER_DIR19    = 89;
  120. const int FOLLOWER_DIR20    = 90;
  121.  
  122. const int FOLLOWER_ID_1_TILE    = 100;
  123. const int FOLLOWER_ID_2_TILE    = 101;
  124. const int FOLLOWER_ID_3_TILE    = 102;
  125. const int FOLLOWER_ID_4_TILE    = 103;
  126. const int FOLLOWER_ID_5_TILE    = 104;
  127. const int FOLLOWER_ID_6_TILE    = 105;
  128. const int FOLLOWER_ID_7_TILE    = 106;
  129. const int FOLLOWER_ID_8_TILE    = 107;
  130. const int FOLLOWER_ID_9_TILE    = 108;
  131. const int FOLLOWER_ID_10_TILE   = 109;
  132. const int FOLLOWER_ID_1_CSET    = 110;
  133. const int FOLLOWER_ID_2_CSET    = 111;
  134. const int FOLLOWER_ID_3_CSET    = 112;
  135. const int FOLLOWER_ID_4_CSET    = 113;
  136. const int FOLLOWER_ID_5_CSET    = 114;
  137. const int FOLLOWER_ID_6_CSET    = 115;
  138. const int FOLLOWER_ID_7_CSET    = 116;
  139. const int FOLLOWER_ID_8_CSET    = 117;
  140. const int FOLLOWER_ID_9_CSET    = 118;
  141. const int FOLLOWER_ID_10_CSET   = 119;
  142.  
  143. const int FOLLOWER_CUR_SRC_DMAP     = 120;
  144. const int FOLLOWER_CUR_SRC_SCRN     = 121;
  145.  
  146.  
  147. // When Link collides with this ffc, it triggers the follower.
  148. //
  149. // When you use this, add a second ffc on the screen with the combo of the follower, and then
  150. // set the Link property of the ffc running the script to the ffc ID of the second ffc.
  151. //
  152. // The second, linked ffc is used to draw the follower until you collect them, and it also sets
  153. // both the tiles to draw, and the CSet to use when drawing the follower.
  154. //
  155. // You can Link this to itself, but then Link will need to walk onto the follower image to 'collect' them.
  156. // Arg 'id' (D2) should be 0 to 9, for a total of 10 possible, unique followers in a quest.
  157. // NOTE: You will need to use this same ID in arg D2 (id) for the LeaveFollower ffc script, as a PAIR.
  158. ffc script Follower
  159. {
  160.     int data[128];
  161.     void run(int sfx, int msg, int id)
  162.     {
  163.         this->Data = CMB_INVISIBLE;
  164.         ffc f = Screen->LoadFFC(this->Link);
  165.         Trace(Screen->D[FOLLOWER_REGISTER]);
  166.         //FOLLOWER_DELIVERED
  167.         if ((Screen->D[FOLLOWER_REGISTER]))
  168.         {
  169.             f->Data = 0;
  170.             SetLayerComboD(1, ComboAt(f->X, f->Y), 0); //Clear the solid combo under the npc follower graphic.
  171.             Quit();
  172.         }
  173.        
  174.         while(1)
  175.         {
  176.             //if ( Follower.data[FOLLOWER_CURRENT_ID] )
  177.             //{
  178.             //  if ( Follower.data[FOLLOWER_CURRENT_ID] == id+1 ) f->Data = 0;
  179.             //  Waitframe(); continue;
  180.             //} //Cannot have two at the same time.
  181.             if ( Collision(this) && !(Screen->D[FOLLOWER_REGISTER]) && !Follower.data[FOLLOWER_CURRENT_ID] )
  182.             {
  183.                 Follower.data[FOLLOWER_CUR_RESCUED] = 2;
  184.                 Game->PlaySound(sfx);
  185.                 Follower.data[FOLLOWER_BASE_TILE] = Game->ComboTile(f->Data)-4;
  186.                 Follower.data[FOLLOWER_CSET] = f->CSet;
  187.                
  188.                 Follower.data[FOLLOWER_ID_1_TILE+id] = Game->ComboTile(f->Data)-4;
  189.                 Follower.data[FOLLOWER_ID_1_CSET+id] = f->CSet;
  190.                 Follower.data[FOLLOWER_CURRENT_ID] = id+1;
  191.                 Follower.data[FOLLOWER_CUR_SRC_DMAP] = Game->GetCurDMap();
  192.                 Follower.data[FOLLOWER_CUR_SRC_SCRN] = Game->GetCurScreen();
  193.                
  194.                
  195.                
  196.                 if ( msg ) Screen->Message(msg);
  197.                 SetLayerComboD(1, ComboAt(f->X, f->Y), 0); //Clear the solid combo under the npc follower graphic.
  198.             }
  199.             if ( Follower.data[FOLLOWER_ACTIVE] > 15 && Follower.data[FOLLOWER_CURRENT_ID] == id+1 )
  200.             {
  201.                 f->Data = 0;
  202.             }
  203.             if ( Link->Action == LA_SCROLLING ) Follower.data[FOLLOWER_ACTIVE] = 16; //Immediately jump on scroll.
  204.            
  205.             Waitframe();
  206.         }
  207.     }
  208.     void wait(int num, int x, int y, int til, int cset, bool noaction)
  209.     {
  210.         for (; num >= 0; --num)
  211.         {
  212.             Screen->FastTile(2, x, y, til, cset, 128 );
  213.             if ( noaction ) { NoAction(); } //NoPress(true); NoInput(true); }
  214.             Waitframe();
  215.         }
  216.     }
  217.     //Returns true if the player is holding, or pressed a directional key or button.
  218.     bool pressedDPad()
  219.     {
  220.         if ( Link->InputUp ) return true;
  221.         if ( Link->InputDown ) return true;
  222.         if ( Link->InputLeft ) return true;
  223.         if ( Link->InputRight ) return true;
  224.         if ( Link->PressUp ) return true;
  225.         if ( Link->PressDown ) return true;
  226.         if ( Link->PressLeft ) return true;
  227.         if ( Link->PressRight ) return true;
  228.         if ( Link->InputAxisUp ) return true;
  229.         if ( Link->InputAxisDown ) return true;
  230.         if ( Link->InputAxisLeft ) return true;
  231.         if ( Link->InputAxisRight ) return true;
  232.         if ( Link->PressAxisUp ) return true;
  233.         if ( Link->PressAxisDown ) return true;
  234.         if ( Link->PressAxisLeft ) return true;
  235.         if ( Link->PressAxisRight ) return true;
  236.         return false;
  237.     }
  238.     //Zelda follows in Link's path with an 8 frame delay before updating
  239.     void draw()
  240.     {
  241.         if ( !Follower.data[FOLLOWER_ACTIVE] ) return;
  242.         if ( pressedDPad() )
  243.         {
  244.             ++Follower.data[FOLLOWER_ACTIVE];
  245.             if ( Follower.data[FOLLOWER_ACTIVE] > 100000 ) Follower.data[FOLLOWER_ACTIVE] = 8; //Don't roll over
  246.            
  247.         }
  248.        
  249.        
  250.            
  251.         if ( Link->Action == LA_GOTHURTLAND ) return; //Don't update if Link was hurt and pushed back.
  252.  
  253.         if ( pressedDPad() )
  254.         {
  255.             ++Follower.data[FOLLOWER_SUBFRAME];
  256.             if ( Follower.data[FOLLOWER_SUBFRAME]&1 )
  257.             {
  258.                 ++Follower.data[FOLLOWER_FRAME];
  259.                 if ( Follower.data[FOLLOWER_FRAME] > FOLLOWER_MAX_FRAME ) Follower.data[FOLLOWER_FRAME] = 0;
  260.             }
  261.            
  262.             Follower.data[FOLLOWER_X] = Link->X;
  263.             Follower.data[FOLLOWER_Y] = Link->Y;
  264.             Follower.data[FOLLOWER_DIR] = Link->Dir;
  265.             for ( int q = FOLLOWER_X12; q >= FOLLOWER_X; --q )
  266.             {
  267.                 Follower.data[q] = Follower.data[q-1];
  268.             }
  269.             for ( int q = FOLLOWER_Y12; q >= FOLLOWER_Y; --q )
  270.             {
  271.                 Follower.data[q] = Follower.data[q-1];
  272.             }
  273.             for ( int q = FOLLOWER_DIR12; q >= FOLLOWER_DIR; --q )
  274.             {
  275.                 Follower.data[q] = Follower.data[q-1];
  276.             }
  277.        
  278.         }
  279.         if ( Follower.data[FOLLOWER_ACTIVE] < 16 ) return; //Wait 8 frames to begin.
  280.         //Draw tiles
  281.         int the_tile;
  282.          
  283.         the_tile = Follower.data[FOLLOWER_BASE_TILE] + (Follower.data[FOLLOWER_DIR12]*4) + Follower.data[FOLLOWER_FRAME];
  284.         //Based on X, Y, Dir and Frame
  285.         Screen->FastTile(2, Follower.data[FOLLOWER_X12], Follower.data[FOLLOWER_Y12],
  286.                     the_tile, Follower.data[FOLLOWER_CSET], 128 );
  287.        
  288.        
  289.         //...then Update the frame
  290.        
  291.     }
  292.    
  293.    
  294.     //Called to initialise the follower.
  295.     void rescue(int follower_midi, int dur)
  296.     {
  297.         if ( Follower.data[FOLLOWER_CUR_RESCUED] < 2 ) return;
  298.        
  299.         --Follower.data[FOLLOWER_CUR_RESCUED];
  300.         if ( !dur ) dur = FOLLOWER_ZELDA_MIDI_DURATION;
  301.         if ( !follower_midi ) follower_midi = FOLLOWER_ZELDA_MIDI;
  302.         Follower.data[FOLLOWER_ACTIVE] = 1;
  303.         if ( Follower.data[FOLLOWER_MIDI_TIMER] == -1 )
  304.         {
  305.            
  306.             Follower.data[FOLLOWER_ORIG_MIDI] = Game->DMapMIDI[Game->GetCurDMap()];
  307.             Follower.data[FOLLOWER_MIDI_TIMER] = dur;
  308.             Game->PlayMIDI(follower_midi);
  309.         }
  310.         else
  311.         {
  312.             --Follower.data[FOLLOWER_MIDI_TIMER];
  313.             if ( Follower.data[FOLLOWER_MIDI_TIMER] < 1 )
  314.             {
  315.                 Game->PlayMIDI(Follower.data[FOLLOWER_ORIG_MIDI]);
  316.                 Follower.data[FOLLOWER_MIDI_TIMER] = 0;
  317.             }
  318.         }
  319.  
  320.     }  
  321.  
  322.     // Clears the follower positions if Link dies, if the playe presses F6, and so forth.
  323.     // Called in active, continue, and exit scripts.
  324.     // Use in Link's Init script if using 2.55.
  325.     void clear()
  326.     {
  327.         for ( int q = FOLLOWER_X; q <= FOLLOWER_X20; ++q )
  328.         {
  329.             Follower.data[q] = Link->X;
  330.         }
  331.         for ( int q = FOLLOWER_Y; q <= FOLLOWER_Y20; ++q )
  332.         {
  333.             Follower.data[q] = Link->Y;
  334.         }
  335.         for ( int q = FOLLOWER_DIR; q <= FOLLOWER_DIR20; ++q )
  336.         {
  337.             Follower.data[q] = Link->Dir;
  338.         }
  339.     }
  340.  
  341.     // Called in the active script during scrolling to prevent the follower from drawing at the wrong position.
  342.     void scroll()
  343.     {
  344.         if ( Link->Action != LA_SCROLLING ) return;
  345.         for ( int q = FOLLOWER_X; q <= FOLLOWER_X20; ++q )
  346.         {
  347.             Follower.data[q] = Link->X;
  348.         }
  349.         for ( int q = FOLLOWER_Y; q <= FOLLOWER_Y20; ++q )
  350.         {
  351.             Follower.data[q] = Link->Y;
  352.         }
  353.         for ( int q = FOLLOWER_DIR; q <= FOLLOWER_DIR20; ++q )
  354.         {
  355.             Follower.data[q] = Link->Dir;
  356.         }
  357.     }
  358. }
  359.  
  360.  
  361. //Place on the screen where Link is to leave the follower, at the position to which you want the
  362. //follower to move toward, and stop, on the screen.
  363. //Set this to run on screen init.
  364. ffc script LeaveFollower
  365. {
  366.     void run(int msg, int itm, int id)
  367.     {
  368.         this->Data = CMB_INVISIBLE;
  369.        
  370.         int the_tile;
  371.        
  372.         if ( (Screen->D[FOLLOWER_REGISTER] & FOLLOWER_DELIVERED) )
  373.         {
  374.             SetLayerComboD(1, ComboAt(this->X, this->Y), FOLLOWER_CMB_BLANK_SOLID); //Clear the solid combo under the npc follower graphic.
  375.             while(1)
  376.             {
  377.                 Follower.wait(2,this->X,this->Y,Follower.data[FOLLOWER_ID_1_TILE+id]+4, Follower.data[FOLLOWER_ID_1_CSET+id],false);
  378.             }
  379.         }
  380.        
  381.         while ( 1 ) //Follower.data[FOLLOWER_X12] != this->X && Follower.data[FOLLOWER_Y12] != this->Y )
  382.         {
  383.             if ( Follower.data[FOLLOWER_CURRENT_ID] == id+1 )
  384.             {
  385.                 Follower.data[FOLLOWER_ANIMATING] = 1;
  386.                 //Move to the target.
  387.                 if ( Follower.data[FOLLOWER_X12] < this->X ) { ++Follower.data[FOLLOWER_X12]; Follower.data[FOLLOWER_DIR12] = DIR_RIGHT; }
  388.                 if ( Follower.data[FOLLOWER_X12] > this->X ) { --Follower.data[FOLLOWER_X12]; Follower.data[FOLLOWER_DIR12] = DIR_LEFT; }
  389.                
  390.                 if ( Follower.data[FOLLOWER_Y12] < this->Y ) { ++Follower.data[FOLLOWER_Y12]; Follower.data[FOLLOWER_DIR12] = DIR_DOWN; }
  391.                 if ( Follower.data[FOLLOWER_Y12] > this->Y ) { --Follower.data[FOLLOWER_Y12]; Follower.data[FOLLOWER_DIR12] = DIR_UP; }
  392.            
  393.                 ++Follower.data[FOLLOWER_FRAME];
  394.                 if ( Follower.data[FOLLOWER_FRAME] > FOLLOWER_MAX_FRAME ) Follower.data[FOLLOWER_FRAME] = 0;
  395.                 the_tile = Follower.data[FOLLOWER_BASE_TILE] + (Follower.data[FOLLOWER_DIR12]*4) + Follower.data[FOLLOWER_FRAME];
  396.                 if ( Follower.data[FOLLOWER_X12] == this->X && Follower.data[FOLLOWER_Y12] == this->Y ) { Follower.data[FOLLOWER_DIR12] = DIR_DOWN; Follower.data[FOLLOWER_FRAME] = 0; }
  397.                
  398.                 if ( !(Screen->D[FOLLOWER_REGISTER]&FOLLOWER_DELIVERED)) Follower.wait(2,Follower.data[FOLLOWER_X12],Follower.data[FOLLOWER_Y12],the_tile, Follower.data[FOLLOWER_CSET],true);
  399.                 else Follower.wait(2,Follower.data[FOLLOWER_X12],Follower.data[FOLLOWER_Y12],the_tile, Follower.data[FOLLOWER_CSET],false);
  400.                 if ( Follower.data[FOLLOWER_X12] == this->X )
  401.                 {
  402.                     if ( Follower.data[FOLLOWER_Y12] == this->Y )
  403.                     {
  404.                         Trace(Follower.data[FOLLOWER_CUR_SRC_DMAP]);
  405.                         Trace(Follower.data[FOLLOWER_CUR_SRC_SCRN]);
  406.                         int src_d = Game->GetDMapScreenD(Follower.data[FOLLOWER_CUR_SRC_DMAP], Follower.data[FOLLOWER_CUR_SRC_SCRN], FOLLOWER_REGISTER);
  407.                         Trace(src_d);
  408.                         src_d |= FOLLOWER_DELIVERED;
  409.                         Trace(src_d);
  410.                         Game->SetDMapScreenD(Follower.data[FOLLOWER_CUR_SRC_DMAP], Follower.data[FOLLOWER_CUR_SRC_SCRN], FOLLOWER_REGISTER, src_d);
  411.                            
  412.                         if ( Follower.data[FOLLOWER_ACTIVE] )
  413.                         {
  414.                             Follower.data[FOLLOWER_ACTIVE] = 0;
  415.                             Screen->D[FOLLOWER_REGISTER] |= FOLLOWER_DELIVERED;
  416.                             Follower.data[FOLLOWER_CURRENT_ID] = 0;
  417.                            
  418.                             //Set the flags on its source screen, too.
  419.                            
  420.                         }
  421.                         if ( msg )
  422.                         {
  423.                             if ( !(Screen->D[FOLLOWER_REGISTER]&FOLLOWER_SHOWED_MESSAGE) )
  424.                             {
  425.                                 Screen->D[FOLLOWER_REGISTER] |= FOLLOWER_SHOWED_MESSAGE;
  426.                                 Screen->Message(msg);
  427.                             }
  428.                         }
  429.                         if ( itm )
  430.                         {
  431.                             if ( !(Screen->D[FOLLOWER_REGISTER]&FOLLOWER_GAVE_ITEM) )
  432.                             {
  433.                                 Screen->D[FOLLOWER_REGISTER] |= FOLLOWER_GAVE_ITEM;
  434.                                 item giveit = Screen->CreateItem(itm);
  435.                                 giveit->X = Link->X;
  436.                                 giveit->Y = Link->Y;
  437.                                 giveit->Pickup = IP_HOLDUP;
  438.                            
  439.                             }
  440.                         }
  441.                         SetLayerComboD(1, ComboAt(this->X, this->Y), FOLLOWER_CMB_BLANK_SOLID); //Set the solid combo under the npc follower graphic.
  442.                         while(1) Follower.wait(2,this->X,this->Y,Follower.data[FOLLOWER_ID_1_TILE+id]+4, Follower.data[FOLLOWER_ID_1_CSET+id],false);
  443.                     }
  444.                 }
  445.             }
  446.             else Waitframe();
  447.        
  448.         }
  449.    
  450.     }
  451. }  
  452.  
  453. //Example global script.
  454. global script FollowerActive
  455. {
  456.     void run()
  457.     {
  458.         Follower.clear();
  459.         while(1)
  460.         {
  461.             //if ( Follower.data[FOLLOWER_ANIMATING] ) { Trace(1); NoAction(); }
  462.             Follower.rescue(FOLLOWER_ZELDA_MIDI, FOLLOWER_ZELDA_MIDI_DURATION);
  463.             Follower.draw();
  464.             Follower.scroll();
  465.             Waitdraw();
  466.             Waitframe();
  467.         }
  468.     }
  469. }
  470.  
  471.  
  472.  
  473.  
  474.  
  475. global script FollowerResume
  476. {
  477.     void run()
  478.     {
  479.         Follower.clear();
  480.     }
  481. }
  482.  
  483. global script Init
  484. {
  485.     void run()
  486.     {
  487.         Follower.data[0] = -1;
  488.         Follower.data[1] = -1;
  489.     }
  490. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement