Question concerning setHp
Posted: Fri Jan 04, 2019 12:16 pm
I've had a question for a while regarding setHp on parts with parents.
I did a quick test in the editor recently, and found that if I set part 1, connected to part 0 (the core) and part 2 (connected to part 1) to 0 hp, they both get destroyed with a single shot if I shoot part 1.
However, if I set the hp of part 1 and part 2 to 1 hp, then part 1 (with part 2 connected to it) will take 13 shots to destroy, meanwhile, part 2 will take 1 shot to destroy.
This pattern continues: with 2 hp, part 1 will take 23 hits to destroy, while part 2 still only takes 1 shot. With 3 hp, part 1 will take 33 hits to destroy, and part 2 will only take 1 shot to destroy.
Until part 2 gets 10 hp, it will be 1 shot, while part 1 seems to have over 100 times as much hp. How come this is the case? Does anyone have an answer for this?
I've been wanting to change the hp of parent parts but the result is so dramatic that I have to un-parent the parts, and connect them to the core, then change the hp of the part so it doesn't get any bonus hp for being a parent.
I did a quick test in the editor recently, and found that if I set part 1, connected to part 0 (the core) and part 2 (connected to part 1) to 0 hp, they both get destroyed with a single shot if I shoot part 1.
However, if I set the hp of part 1 and part 2 to 1 hp, then part 1 (with part 2 connected to it) will take 13 shots to destroy, meanwhile, part 2 will take 1 shot to destroy.
This pattern continues: with 2 hp, part 1 will take 23 hits to destroy, while part 2 still only takes 1 shot. With 3 hp, part 1 will take 33 hits to destroy, and part 2 will only take 1 shot to destroy.
Until part 2 gets 10 hp, it will be 1 shot, while part 1 seems to have over 100 times as much hp. How come this is the case? Does anyone have an answer for this?
I've been wanting to change the hp of parent parts but the result is so dramatic that I have to un-parent the parts, and connect them to the core, then change the hp of the part so it doesn't get any bonus hp for being a parent.