Is that possible to destroy a NPC after it triggered the screen? (4.5.9) (SOLVED!)

claydragon44

New member
Hi, I'm still using the Metroidvania Module, and I was thinking if it's possible to destroy it instantly like a regular monster since it remains there until I drop or warp to another screen using the triggerScreen macro. I'm almost near the end of the completion of my Byte Off 4 demo mechanics and I'm really excited and relieved. Thank you for any help you can provide me.
 

smilehero65

Active member
Hi, I'm still using the Metroidvania Module, and I was thinking if it's possible to destroy it instantly like a regular monster since it remains there until I drop or warp to another screen using the triggerScreen macro. I'm almost near the end of the completion of my Byte Off 4 demo mechanics and I'm really excited and relieved. Thank you for any help you can provide me.
Hi!
You could do that by editing an End of Text Action.
I'm not really sure where the scripts for that are located, but you may look at this thread to get an idea:

End of Text Action --> warps
 

claydragon44

New member
@smilehero65 Hi! I've tried the warps scripts thingy you've suggested me in every possible ways I could think of but my character just keeps falling down like there's no tomorrow or the NESmaker Compiler keeps giving me errors... After I've passed the "right parameters" for the same screen, I'm warping all right in the right screen but that NPC still there grinning at me... I know I could have give the parameters for another screen but it wouldn't give the gameplay any sense so I'm back to square one about my issue. Trying to figure out how to destroy that NPC when the text box goes away.

Thank you for your insight anyway, it was appreciated.
 

smilehero65

Active member
@smilehero65 Hi! I've tried the warps scripts thingy you've suggested me in every possible ways I could think of but my character just keeps falling down like there's no tomorrow or the NESmaker Compiler keeps giving me errors... After I've passed the "right parameters" for the same screen, I'm warping all right in the right screen but that NPC still there grinning at me... I know I could have give the parameters for another screen but it wouldn't give the gameplay any sense so I'm back to square one about my issue. Trying to figure out how to destroy that NPC when the text box goes away.

Thank you for your insight anyway, it was appreciated.
Sorry for not being at much help...šŸ˜”
I'm not really into text boxes.
 

dale_coop

Moderator
Staff member
@claydragon44
If you use the "end text -> warp" only for those NPCs, then, you could just add a "TriggerScreen screenType" after the "WarpToScreen warpToMap, warpToScreen, #$01" in the DoDrawBox.asm script.
Doing that it would trigger and reload the screen (make sure to set correctly the Warp out x,y and Warp in x,y settings inyour Screen Infos)
 

claydragon44

New member
@dale_coop Thanks Dale. You're about to save my bacon there. Only one thing though I forgot to mention: I don't want to erase every NPC of my demo that way. I want some NPCs to act like real NPCs and I want them to remain at their screen locations. Exemple, the NPC I want to destroy is located at screen 0 and that's the only one NPC I want to destroy for my Byte Off demo. The 2 other NPCs are located at screen 1 and 2. My last question then is: Can I tell DoDrawText.asm script to trigger only the screens and then destroying the NPCs I want.
 
Last edited:

smilehero65

Active member
@dale_coop Thanks Dale. You're about to save my bacon there. Only one thing though I forgot to mention: I don't want to erase every NPC of my demo that way. I want some NPCs to act like real NPCs and I want them to remain at their screen locations. Exemple, the NPC I want to destroy is located at screen 0 and that's the only one NPC I want to destroy for my Byte Off demo. The 2 other NPCs are located at screen 1 and 2. So the way I see it, is, I should be able to Destroy the NPC I want depending of the player and NPC screen location. My last question then is: Can I trigger any screen I want by passing it as another new parameter for the command "TriggerScreen screenType" in the DoDrawText.asm script?
mmmmm... just a random thought.
Why wouldn't use a Monster bit to create your type of destroyable NPC?

I think that way you don't need to worry about NPCs screen positions or screen triggers.

Just to clarify, Monster bits are present in the GUI, but don't actually work.


So, in my theory, at the moment where in your script the object is destroyed, just add a check for Monster Bits.

If Monster Bits = Destroyable NPC, then Destroy the object.

Maybe this may not work with what you're looking for, but adding monster bits can add more possibilities with Monster types anyways.
 

claydragon44

New member
@dale_coop @smilehero65 I was wrong all the time! I did not understand the purpose of using "OpenShop" in the "End of text Action - Warp" posted earlier, that OpenShop thingy allowing which NPC I want to destroy and letting live the ones I want to!

As soon as I got it, I just made a tremendous progress tonight. Every mechanics works perfectly and I will be finally able to complete my Byte Off demo entry in time. Thanks to both of you so much, you are the guys who just made it possible tonight. I can now sleep happy and relieved! You won't be forgotten! The NES maker community is awesome!
 

smilehero65

Active member
@dale_coop @smilehero65 I was wrong all the time! I did not understand the purpose of using "OpenShop" in the "End of text Action - Warp" posted earlier, that OpenShop thingy allowing which NPC I want to destroy and letting live the ones I want to!

As soon as I got it, I just made a tremendous progress tonight. Every mechanics works perfectly and I will be finally able to complete my Byte Off demo entry in time. Thanks to both of you so much, you are the guys who just made it possible tonight. I can now sleep happy and relieved! You won't be forgotten! The NES maker community is awesome!
Good! Really happy to hear that!
 
Top Bottom