ZoriaRPG

Enemy Editor Flags for ganon and default invisibility

Oct 5th, 2018
132
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //ganon flags:
  2.  
  3. flag1: visible to amulet2 ->Move to 2
  4. flag2: but cloaked -> Move to 3
  5. flag3: shots are visible -> move to 4
  6.  
  7. if ( family == eeGANON )
  8. {
  9.     if ( editorflags & ENEMY_FLAG2 ) //ganon is visible to level 2 amulet
  10.     {
  11.         if ( current_item_power(itype_amulet) >= 2 ) //has amulet 2
  12.         {
  13.             if ( editorflags & ENEMY_FLAG3 ) //draw cloaked
  14.             {
  15.                 sprite::drawcloaked(dest);
  16.             }
  17.             else
  18.             {
  19.                 sprite::draw(dest);
  20.             }
  21.         }
  22.     }
  23. }
  24.  
  25. //general enemy flag 1 : Invisible
  26. //general enemy flag 2: revealed by amulet
  27. //general enemy flag 3: but draw cloaked
  28.  
  29.  
  30. In sprite::draw
  31.  
  32. ```if(family !=eeGANON && hclk>0 && get_bit(quest_rules,qr_ENEMIESFLICKER))
  33.  
  34.         {
  35.  
  36.             if((frame&1)==1)
  37.  
  38.                 sprite::draw(dest);
  39.  
  40.         }
  41.  
  42.         else
  43.  
  44.             sprite::draw(dest);```
  45.    
  46.     Padd sprite::draw() as follows:
  47.    
  48.    
  49.  
  50. //if not invisible, or the player is using a lens of truth that sees invisivle enemies
  51. if ( (!editorflags & ENEMY_FLAG1)
  52.     || ( lensclk
  53.     && itemsbuf[Link.getLastLensID()].flags & ITEM_FLAG5 ) ) //not invisible
  54. {
  55.     sprite::draw(dest);
  56. }
  57. else
  58. {
  59.    
  60.     if ( editorflags & ENEMY_FLAG2 ) //visible to amulet
  61.     {
  62.         if ( current_item_power(itype_amulet) an amulet
  63.         {
  64.             if ( editorflags & ENEMY_FLAG3 ) //draw cloaked
  65.             {
  66.                 sprite::drawcloaked(dest);
  67.             }
  68.             else
  69.             {
  70.                 sprite::draw(dest);
  71.             }
  72.         }
  73.     }
  74. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×