Frictional Games Forum
Entity Health - Printable Version

+- Frictional Games Forum (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Entity Health (/thread-24034.html)



Entity Health - RaideX - 12-05-2013

Hey there guys.

What would be the easiest way to let an entity, let's say a door, last longer when attacked by an enemy without changing anything filewise.

Is this even possible to do with scripts / levelediting?

If everything fails i'll just have to duplicate the door and edit it's health but that seems wrong in my eyes. Not sure why.

Maybe i'm just mistaken with that feeling but i think you guys can help me out better then myself.


RE: Entity Health - DnALANGE - 12-05-2013

Model editor, look for your door.
Settings \ user defined variables->
Try making the door health 200? 300?
Save in your CS.
Try that.


RE: Entity Health - RaideX - 12-05-2013

(12-05-2013, 07:32 PM)DnALANGE Wrote: Model editor, look for your door.
Settings \ user defined variables->
Try making the door health 200? 300?
Save in your CS.
Try that.

Yeah, that's what would've done when everything else fails. I just thought there is an easier way of doing that.
Thanks anyway!


RE: Entity Health - DreamScripters - 12-11-2013

(12-05-2013, 08:35 PM)RaideX Wrote:
(12-05-2013, 07:32 PM)DnALANGE Wrote: Model editor, look for your door.
Settings \ user defined variables->
Try making the door health 200? 300?
Save in your CS.
Try that.

Yeah, that's what would've done when everything else fails. I just thought there is an easier way of doing that.
Thanks anyway!

Try this, hope it helps you! Big Grin

void AddPropHealth(string& asName, float afHealth);


RE: Entity Health - Romulator - 12-12-2013

Just remember if you're doing the editing using the Model Editor, it will apply to ALL doors with that particular use Smile So it would be best to make a copy of the door :3


RE: Entity Health - DreamScripters - 12-12-2013

(12-12-2013, 12:47 AM)Romulator Wrote: Just remember if you're doing the editing using the Model Editor, it will apply to ALL doors with that particular use Smile So it would be best to make a copy of the door :3

I got a question myself though, wouldn't it be easier if he just used a script to do it? I didn't really explain allot in my first reply but all you would need to do is this I believe:

Code:
SetPropHealth(string& asName, float afHealth);

asName - Entity name. (Your door)
afHealth - Amount of health the entity has. (200 - 300 maybe?)

Or, I believe you could even do this:

Code:
AddPropHealth(string& asName, float afHealth);

asName - Entity name. (Your door)
afHealth - Amount of health to add. (100 - 200 maybe?)

Like you said though. Doing it through the model editor would affect all other doors of the same type unless you made a copy. But I believe the simpler and more realistic way of doing it would be doing this. Big Grin

Oh, and some side notes. The default door health (at least for the default castle doors) is "100". So, if we take that and divide it by the amount of hits a grunt has to do to break it. Then we get "25". (4 hits) And, for a brute its "50". (2 hits) So, just multiply those numbers by the amount of hits you want it to take them to get through the door and you have the health you want it to be at! Big Grin


RE: Entity Health - Romulator - 12-12-2013

(12-12-2013, 03:05 AM)DreamScripters Wrote:
Spoiler below!

I got a question myself though, wouldn't it be easier if he just used a script to do it? I didn't really explain allot in my first reply but all you would need to do is this I believe:

Code:
SetPropHealth(string& asName, float afHealth);

asName - Entity name. (Your door)
afHealth - Amount of health the entity has. (200 - 300 maybe?)

Or, I believe you could even do this:

Code:
AddPropHealth(string& asName, float afHealth);

asName - Entity name. (Your door)
afHealth - Amount of health to add. (100 - 200 maybe?)

Like you said though. Doing it through the model editor would affect all other doors of the same type unless you made a copy. But I believe the simpler and more realistic way of doing it would be doing this. Big Grin

Oh, and some side notes. The default door health (at least for the default castle doors) is "100". So, if we take that and divide it by the amount of hits a grunt has to do to break it. Then we get "25". (4 hits) And, for a brute its "50". (2 hits) So, just multiply those numbers by the amount of hits you want it to take them to get through the door and you have the health you want it to be at! Big Grin


Quote in spoiler for room Tongue

Yes, but it's a suggestion as an addon to what DnALANGE said, as editing the doors health will change all of those doors, even in the main game xD Your above suggestion works as well, but this is just in case you change the model :3