Need Help with Custom NPC Scripting

Moderators: Semi-moderatos, Moderators, SMBX2

MikeyG117
Topic author, Passerby
Passerby
MikeyG117
Topic author, Passerby
Passerby
Reputation: 0
Posts: 1
Joined: 21 Jun 2020

Post #1by MikeyG117 » 21 Jun 2020, 11:31

So I'm using the latest version of SMBX2, and I've got a great project I'm working on, but it's hit a snag.

I wanted the third level in my game to feature a little mini-boss that you need to fight, and it's mostly done! I've made my own sprite and I'm fairly satisfied with the NPC's behavior. There's just one glaring issue, I can't figure out how to modify it's health.

Future boss battles will not be very interesting if they die in one hit! I've searched all over the internet and found multiple answers that didn't really do anything. The first thing I tried was to simply put "Health=5" in the .txt file for the NPC. Then I tried other things I found on the internet relating to BossHP, HealthPoint.Lua, and even SetHits, but it seems that no matter what I put in the NPC's text or .Lua file, it either doesn't work or just breaks the NPC entirely.

I'm kinda at a dead end here now, so if anyone is knowledgeable about this stuff, please help! This is a custom NPC with the ID of 751, so it is not a redesigned NPC from the vanilla game. I already know how to make the NPC immune to fireballs and harm types, I just need to know how a newly designed custom NPC can have more health. Thank you in advance, I know this was a lengthy post!

Return to “SMBX2 Troubleshooting”

Who is online (over the past 5 minutes)

Users browsing this forum: 2 guests