Yes. It is sometimes a feature for nesmaker and called Monster Locks. Should be like vids 5 and 6 in the new summer camp vid series for 4.5. Should be able to find the vids on the nesmaker site or here in annoincements i think. For doing a single specific monster, like we will call him a "gatekeeper", in the code when it destroys a monster who is out of health, you would end up asking if its monster 8 and if so, go do monster lock code.
Oor make it trigger screentype in that room, also have the room somewhere else you want "unlocked" to have the same screentype.
Example. Im in screentype 03. I kill gatekeeper whos death triggers screentype. Nothin in here but 5 rooms over was the other room that is screentype 03 also. Which was triggered when we killed "gatekeeper" in the first room, and so has unlocked a door or monsterlock. In the 2nd room in question.
Screentypes and monsterlocks work seperately. But i think to make the monster lock stay "unlocked" you do have to subsequently trigger that screen as that is how monsterlocks work.
Code:
Code example:
;;heres where monster death happens in my code
LDA object_y_hi,x
STA temp1
;;so before deactivating the monster,right here compare to the specific monster
;;if its him,now execute monsterlocks or triggerscreentype
;;if not the specific monster,simply continue,actually continue either way
DeactivateCurrentObject
PlaySound #SND_SPLAT
CreateObject temp, temp1n #OBJ_MONSTER_DEATH, #$00 , currentNametable
This is only an example of code and using monsterlocks is actually more involved so watchin the vids is best.
But just think about code in a way like you would litterally say what you want. When monster dies i want to know if it was the gatekeeper. If it is, i want this to open up and unlock, open and unlock means do this, do this is change tile to walkable and change graphic, i want thi to save,so trigger screentype.
If you are looking for a more specific answer im sure someone else will chime in to help also. But i hope this helps understand what you may want to think about atleast. An undersatnding of like a flowchart or a program analysis mentallity helps. Or like binaryor somethin. Just yes and no's, and branches and returns. Within the answers to questions are more questions,and so on.
Monster killed,
Is this monster 08,yes
do i unlock door,yes.
update score,yes
Is score a hud variable,no
update hud,no
does the enemy drop an item,no
play a sound,yes
Loop
another monster killed,
is this monster 08,no,
do i unlock do,no
Yes,no,branch,loop and check again.