How can I explode my enemies when they die?

FrankenGraphics

New member
The key is that it doesn't happen after death, but rather just right before. As a last step in the monsters "die code", spawn the explosion before deleting the monster object. Otherwise there's no object left that can spawn the explosion!
 

darkhog

New member
Yeah, I get that, but where exactly do I do this so CreateObject macro has data on where on screen to put the object (x,y). Specifics!
 

FrankenGraphics

New member
If you want a specific answer, it helps to ask a specific question. People with potential answers can't fortune tell what you're actually looking for. Broad questions tend to lead to no answers, misdirected answers (this case), or essays. I'm honestly still not quite sure what you are asking - Is it what the variables for the monster position are called? Or is it where/when you should be loading the positions? Or how to pass arguments to the macro in order for it to have something to work with? Here's some answers based on those assumptions:

-use the variables that represent the x and y object position of the monster - unless your explosion is bigger or smaller than the monster. Then it needs to be offset.

-take a look at the macro. what registers does it use to decide a spawning x and y position? Those are the registers you want to pass your data through. load the data into the right registers, call the macro, and that should do it.

-I don't know what the monster objects' position variables are named because i don't have nesmaker installed, but it should be a ctrl+f search away if they are reasonably labeled or commented. Or else chances are these are defined close to the top of one of the main .asm or .inc files. That's a good place to look for them if a search query doesn't yield the proper result.
 
Top Bottom