home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 2003 June / macformat-130.iso / mac / Reviewed⁄Demos / Spearhead Demo / demota / pak1.pk3 / global / fadein.scr < prev    next >
Encoding:
Text File  |  2002-10-21  |  1.6 KB  |  92 lines

  1. //------------------------------------------------------------------
  2. //    FadeIn.scr
  3. //    Jeff Leggett
  4. //    07/19/2002
  5. //
  6. //    Re-usable fade-in routine.
  7. //
  8. //    exec this script before your waittill spawn command.
  9. //
  10. //    Call fadein to put up the text menus and fade in the screen.
  11. //    
  12. //------------------------------------------------------------------
  13.  
  14.  
  15. //------------------------------------------------------------------
  16. main:
  17. //
  18. //    prepare for the fade in...
  19. //------------------------------------------------------------------
  20.     fadeout .001 0 0 0 1
  21.     drawhud 0
  22.  
  23.     End
  24.  
  25. //------------------------------------------------------------------
  26. DoFadeIn local.menu1 local.menu2 local.menu3 local.menu4 local.bDrawHud:
  27. //------------------------------------------------------------------
  28.  
  29.     if (getcvar(debug) == "1")
  30.     {
  31.         fadein 0.1 0 0 0 1
  32.         drawhud 1
  33.         End
  34.     }
  35.  
  36.     if ( local.bDrawHud==NIL )
  37.         local.bDrawHud = 1
  38.     
  39. // NOTE: if a menu is not showing up you may need to increase this wait
  40.     wait 1.5
  41.         
  42.     showmenu local.menu1
  43.     hidemouse
  44.     wait 1.5
  45.  
  46.     if ( local.menu2!=NIL )
  47.     {
  48.         showmenu local.menu2
  49.         hidemouse
  50.  
  51.         wait 2.25
  52.     }
  53.  
  54.     if ( local.menu3!=NIL )
  55.     {
  56.         showmenu local.menu3
  57.         hidemouse
  58.  
  59.         wait 3
  60.     }
  61.  
  62.     if ( local.menu4!=NIL )
  63.     {
  64.         showmenu local.menu4
  65.         hidemouse
  66.  
  67.         wait 3
  68.     }
  69.  
  70.     fadein 3.5 0 0 0 1
  71.  
  72. //    wait 0.5
  73.     hidemenu local.menu1
  74.  
  75.     if ( local.menu2!=NIL )
  76.         hidemenu local.menu2
  77.  
  78.     if ( local.menu3!=NIL )
  79.         hidemenu local.menu3
  80.  
  81.     if ( local.menu4!=NIL )
  82.         hidemenu local.menu4
  83.  
  84.     hidemouse
  85.  
  86.     if ( local.bDrawHud==1 )
  87.     {
  88.         drawhud 1
  89.     }
  90.  
  91.     End
  92.