Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Entity Health
RaideX Offline
Member

Posts: 212
Threads: 33
Joined: May 2013
Reputation: 7
#1
Entity Health

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.

If you don't draw first, you don't get to draw at all... -The False Shepherd
(This post was last modified: 12-05-2013, 06:49 PM by RaideX.)
12-05-2013, 06:23 PM
Find Reply
DnALANGE Offline
Banned

Posts: 1,549
Threads: 73
Joined: Jan 2012
#2
RE: Entity Health

Model editor, look for your door.
Settings \ user defined variables->
Try making the door health 200? 300?
Save in your CS.
Try that.
12-05-2013, 07:32 PM
Find Reply
RaideX Offline
Member

Posts: 212
Threads: 33
Joined: May 2013
Reputation: 7
#3
RE: Entity Health

(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!

If you don't draw first, you don't get to draw at all... -The False Shepherd
12-05-2013, 08:35 PM
Find Reply
DreamScripters Offline
Junior Member

Posts: 25
Threads: 4
Joined: Dec 2013
Reputation: 0
#4
RE: Entity Health

(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);
12-11-2013, 05:04 PM
Website Find Reply
Romulator Offline
Not Tech Support ;-)

Posts: 3,626
Threads: 62
Joined: Jan 2013
Reputation: 195
#5
RE: Entity Health

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

Discord: Romulator#0001
[Image: 3f6f01a904.png]
12-12-2013, 12:47 AM
Find Reply
DreamScripters Offline
Junior Member

Posts: 25
Threads: 4
Joined: Dec 2013
Reputation: 0
#6
RE: Entity Health

(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:

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:

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
(This post was last modified: 12-12-2013, 03:22 AM by DreamScripters.)
12-12-2013, 03:05 AM
Website Find Reply
Romulator Offline
Not Tech Support ;-)

Posts: 3,626
Threads: 62
Joined: Jan 2013
Reputation: 195
#7
RE: Entity Health

(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:

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:

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

Discord: Romulator#0001
[Image: 3f6f01a904.png]
12-12-2013, 04:08 AM
Find Reply




Users browsing this thread: 1 Guest(s)