BEES! How to Create (Virtually) Unlimited Monsters

SciNEStist

Well-known member
I'm afraid that error mean you have exceeded the space allowed in a bank. you are going to have to find a way of slimming down some code, or figure out some bankswitching to move things around.
 
Any ideas which bank and what other stuff shares that bank? I can do some slimming I've been pretty careless with that stuff so far.
 

DocNES

Member
Was working through this and realized I could just probably adapt my shoot monster script. I liked having the option of LDX player1_object BUT The spawned monster basically has no bounding box. I can't be hurt by them, I can't hurt them. Or use my Pogo Jump on them.

Joe had a nice tutorial on the Learn. I believe it was the Platformer one with the DragonDudes. But his was more tile based, and set to the action timer. I like this method since you can destroy the "Hive" easily, and is easier to adjust a more exact time (for me anyways).

@An ironman This should get you squared away. And works with 4.5.9, I'm doing a the MetroVania Module. Monsters IDs start at 16 instead of zero. My Monster is the 5th in the list so it would #20.

CountObjects #%00001000 ;; Check if object is Flagged Monster
CMP #6; DocNES; Limit to 5 Monsters of ScreenMAX
BEQ labDoNotSpawn:

TXA
PHA
TYA
PHA

LDA Object_x_hi,x
CLC
ADC #$00
STA tempA

LDA Object_screen,x
ADC #$00
STA tempD
LDA Object_y_hi,x

CLC
ADC #$00 ;; Where the object is going to be created; add 4 pixels down

STA tempB
LDA Object_direction,x
AND #%00000111
STA tempC
CreateObjectOnScreen tempA, tempB, #20, #$00, tempD
;;; x, y, object (Game Object) in this case our bullet, starting action step
;;; and now with that object, copy the player's
;;; direction and start it moving that way.
LDA tempC
STA Object_direction,x
TAY
LDA DirectionTableOrdered,y
STA temp1
TXA
STA temp
StartMoving temp, temp1

PLA
TAY
PLA
TAX

labDoNotSpawn:
RTS
 
Last edited:
Top Bottom