One HP parts

Scripting help, tricks, and tips. How to use the editor.
Post Reply
Mouzi
Posts: 153
Joined: Sat Sep 01, 2007 5:34 am
Location: Finland
Contact:

One HP parts

Post 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.
swartzer
Posts: 144
Joined: Sun Oct 21, 2007 1:38 pm

Re: One HP parts

Post 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:
Post Reply