Page 1 of 1

One HP parts

Posted: Sun Dec 13, 2009 7:18 am
by Mouzi
I guess someone may have noticed this already, but I haven't seen anything about it so here goes.

Well, you know you can add HP to a part by adding child parts to it. But how about reducing the HP?
It would of course be easiest if it was implemented straight into the game but there is another way which actually shouldn't be there.

When you add a child part to a part, it gets +300 HP for each child you add. If you shoot down a child part the 300 HP is then reduced. But if you use AI_destroy in your AI code by itself, without any timers, the parts are destroyed before the HP is added (at least looks like it) and only the reduction occurs resulting in less HP. Now this clearly is a bug, but it doesn't affect negatively any normal level designing so it actually just adds more feature :P With this you can implement levels with some crucial part that only needs to be hit once but is well shielded. Or maybe something like my example level. Despite the name it doesn't actually have one HP but 100 HP. They will still be destroyed in one shot because that's how much one shot damages. Here's a list to clear it up a bit:
Image
Part is the part name, HP is initial part HP, Children is how many child parts are required for it to be destroyed in one hit and End HP is how much it will have HP after the child parts are destroyed. You probably won't need the value for forcefieldLine unless your computer can handle 300k parts but it's there for reference. You could always cheat though ;P

I also thought this might have allowed multipart triggers (all parts need to be destroyed to trigger command), but because the HP isn't checked before you shoot the part it can go to zero and even negative without blowing up.

Re: One HP parts

Posted: Tue Dec 29, 2009 12:35 am
by swartzer
This is slick! Thanks for the chart of HP too; I've always meant to do that research but I'm lazy. :wink: