Berkeloid's shooting behaviour code

Request patches for Keens 4-6.
Post Reply
User avatar
Dr.Colossus
Posts: 33
Joined: Thu Aug 02, 2012 8:41 pm
Location: Germany

Berkeloid's shooting behaviour code

Post by Dr.Colossus »

I'm just working on a mod and wanted to recycle the Berkeloid's flaming behaviour but this part is missing on shikadi.net. Does anybody know the code for $108004A4RL #Berkeloid make flame?

Thanks
levellass
Posts: 3001
Joined: Wed Oct 11, 2006 12:03 pm
Location: Ngaruawahia New Zealand

Re: Berkeloid's shooting behaviour code

Post by levellass »

Added the flame code.

This is the complete code for the Berkeloid producing a flame. On the second line the flame's activity is set to 3, ensuring it will stay active offscreen and not surprise the player. Its sprite type is set as $0E. On the third line the flame's verticla spawn position is set as half a tie (8 pixels or $0080W) down from the top of the Berkeloid and its vertical speed is set as -8 ($FFF8W or slightly upwards.)

On line 4 the game checks to see which way the Berkeloid is facing, if it is facing right then the flame's Vertical speed is set to 48 ($0030W), it is spawned 2 tiles right ($05 $0200W) of the Berkeloid's left edge and its horizontal direction is set to 1. Otherwise its speed is set to -48 ($FFD0W), it is spawned one tile ''left'' ($2D $0100W) of the Berkeloid's left edge and its horizontal direction is set to -1.

On the last lines the flame's action is set ($2CD8W) and the ''Berkeloid's'' Misc C variable is set to 1, important for its hovering above the ground code.

Code: Select all

#Berkeloid make flame code
%patch $10CA4 $55 $8B $EC $56 $8B $76 $06 $B8 $0001W  $50 $9A $06BD1E11RL    
              $83 $C4 $02 $8B $1E $D8 $A7 $C7 $47 $02 $0003W  $C7 $07 $000EW
              $8B $44 $0C $05 $0080W  $89 $47 $0C $C7 $47 $18 $FFF8W  $83 $7C
              $0E $01 $75 $15 $C7 $47 $16 $0030W  $8B $44 $0A $05 $0200W  $89
              $47 $0A $C7 $47 $0E $0001W  $EB $17 $8B $1E $D8 $A7 $C7 $47 $16
              $FFD0W  $8B $44 $0A $2D $0100W  $89 $47 $0A $C7 $47 $0E $FFFFW
              $B8 $2CD8W  $50 $FF $36 $D8 $A7 $9A $09DC118CRL     $83 $C4 $04
              $C7 $44 $04 $0001W  $5E $5D $CB
User avatar
Dr.Colossus
Posts: 33
Joined: Thu Aug 02, 2012 8:41 pm
Location: Germany

Re: Berkeloid's shooting behaviour code

Post by Dr.Colossus »

Great. Thank you!
Post Reply