Help creating "boss death" game object.

Raftronaut

Member
Looking to create a specialized monster death animation specifically used for boss fights. This way I can use BossMonsterDeath action state to play a victory jingle and the warp to a new screen on a timer.

I am having some trouble understanding how I would set this up.

I am not sure how I would be able to separate Monster death and Boss Death yet. I assume I would need to create a USER VARIABLE for Boss death and set up some code to check to see if monster object is BossMonster somewhere (I am not at my computer at the moment, but assume this would be handle monster death script), but not sure where at the moment. From there I would need to define BossMonster over regular Monsters somewhere. I think that would be under project labels perhaps? Or User defines?

If anyone has any insight it would be greatly appreciated
 

Mugi

Member
you will have to create a separate death object for the boss death, and then you will have to modify your monster death routine to check that if the monster that died matched the boss monster, the boss monster death object would spawn instead
of the normal death object.

for me its inside handlespriteweapon because im using sprite based weapons. for object based weapons it's elsewhere, propably in the handlemonster hurt script.

aasad.png


in the picture you can see the i isMonsterDeathSpriteWeapon: label that stores the monster's position, deactivates it, and creates a monster death object in it's place.

in this you'd have to add a check to see if the dead monster matches the boss monster, and if does, it would spawn a different object instead of monster death object.

for example, if your boss monster ID would be #$10 and your boss monster death object would be #$11

the code would look something like this:

Code:
isMonsterDeathSpriteWeapon:

        LDA Object_x_hi,x
        STA temp
        LDA Object_y_hi,x
        STA temp1
	CPX #$10
	BEQ spawnBossDeath
        DeactivateCurrentObject
        CreateObject temp, temp1, #OBJ_MONSTER_DEATH, #$00, currentNametable
	JMP continuekillingmonster
spawnBossDeath:
        DeactivateCurrentObject
	 CreateObject temp, temp1, #$11, #$00, currentNametable
continuekillingmonster:
 

Raftronaut

Member
Mugi said:
in this you'd have to add a check to see if the dead monster matches the boss monster, and if does, it would spawn a different object instead of monster death object.

for example, if your boss monster ID would be #$10 and your boss monster death object would be #$11

Awesome, that seems fairly close to the logic I had thought. Could you tell me how you Handled your Boss Monster ID? I assume Boss Monster would need to be set up somewhere Either Player Variables, Or Project labels?

Care to shed some light on this for me?
 

Mugi

Member
the boss id is just the number of the monster object.

the "game objects" are numbered from #$00 to #$0F and the first monster in the monsters list is object ID #$10
you just look at what is the ide of your boss monster and use that. Same with the boss death object ID.

Personally i handle this completely differently, since dimensionshift has a separate piece of code called mapscript which takes over the control of objects during bossfights that allows me to merge several objects into a single
multi-form boss.
 

Raftronaut

Member
Mugi said:
the boss id is just the number of the monster object.

the "game objects" are numbered from #$00 to #$0F and the first monster in the monsters list is object ID #$10
you just look at what is the ide of your boss monster and use that. Same with the boss death object ID.

Personally i handle this completely differently, since dimensionshift has a separate piece of code called mapscript which takes over the control of objects during bossfights that allows me to merge several objects into a single
multi-form boss.

That gives me something to chew on for now, appreciate the feedback as always :)
 

Raftronaut

Member
Mugi said:
the boss id is just the number of the monster object.

the "game objects" are numbered from #$00 to #$0F and the first monster in the monsters list is object ID #$10
you just look at what is the ide of your boss monster and use that. Same with the boss death object ID.

Personally i handle this completely differently, since dimensionshift has a separate piece of code called mapscript which takes over the control of objects during bossfights that allows me to merge several objects into a single
multi-form boss.
Mugi, I am still a little confused by this, If I have 8 different bosses I would need to include those 8 different monster memory locations in the ASM script I would edit to determine monster death?
 

Mugi

Member
this is propably slightly different from yours since it's for sprite based weapons (my monster death handling is in the sprite weapon code) but the basic idea is the same.

deadhcode.png


basically you add a CPX to each value (boss monster) you wish to have a specific death animation object, and make a CreateObject line for each.

alternatively, you could make the CPX store a new value (ID of the death object) into temp2
then just use temp2 to create the death object. It'd propably save some bytes of space for the code.
 
Top Bottom