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


Thread Rating:
  • 2 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Prison Section Door
AlexxShadenk777 Offline
Junior Member

Posts: 40
Threads: 5
Joined: Jul 2011
Reputation: 1
#11
RE: Prison Section Door

I opened up both enemies in the model editor, and looked into their stats in the user defined variables. Scrolled down to their respective BreakDoorAttackDamage spaces but it occurred to me that it can't be the damage, otherwise a Grunt would eventually destroy that door, just take twice as long as a Brute (damage is 26 for a Grunt, 50 for a Brute). However, if you look further down there's the stat BreakDoorAttackStrength, and it's 6 for a Grunt, but 3 for the Brute.

Just a thought, maybe that 3 is relevant. Or it's just something else entirely. It's something.
(This post was last modified: 07-26-2011, 09:11 PM by AlexxShadenk777.)
07-26-2011, 09:10 PM
Find
MrCookieh Offline
Member

Posts: 157
Threads: 8
Joined: Jul 2011
Reputation: 0
#12
RE: Prison Section Door

Okay, that would be awesome if it works, because my 'Hide door1, unhide destroyed door2' thing
doesn't work really well, because the grunt keeps hitting in the air.
I'm trying it out now Smile

/After Testing: Nope, doesn't work :/
anyways, thanks for help, I might search in the model editor any options, which might help!

The Well: Descent - Take a look at it!
(This post was last modified: 07-26-2011, 09:24 PM by MrCookieh.)
07-26-2011, 09:18 PM
Find
Grimstoll Offline
Junior Member

Posts: 6
Threads: 2
Joined: Jul 2011
Reputation: 0
#13
RE: Prison Section Door

If you're willing to use the model editor i suppose you could open the prison section door, (save as a new entity called prison_section_YOURNAMEHERE.ent) click on the hinges, check 'Disable Visible Mesh' (or something similar) and delete the hinge body. then delete the hinge_constraint. You can then test the entity by pressing the cogwheels at the bottom. The door should move freely, as if not on hinges.

Then you can use palistov's suggestion, but instead of using setprophealth(0); you use SetEntityActive("prison_section_mycustomentity" , true);

Edit: There is already a prison_section_broken.ent, just use SetEntityActive("prison_section_broken" , true); after three or four hits.
Also it seems there is no 'Disable Visible Mesh' checkbox, even though i'm positive i saw one earlier...
Nevermind, you've already tried that, maybe try going into model editor>settings>uservariables and make sure that the entity which spawns on break is prison_section_broken.ent
(This post was last modified: 07-27-2011, 12:11 AM by Grimstoll.)
07-27-2011, 12:02 AM
Find
MrCookieh Offline
Member

Posts: 157
Threads: 8
Joined: Jul 2011
Reputation: 0
#14
RE: Prison Section Door

I already tried it with setting the prison door active = false, but then the grunt doesn't stop attacking
the air, although I removed his current pathnodes, and gave him new ones.

And how can I get how many times the grunt hit the door?

The Well: Descent - Take a look at it!
07-27-2011, 11:05 AM
Find
Grimstoll Offline
Junior Member

Posts: 6
Threads: 2
Joined: Jul 2011
Reputation: 0
#15
RE: Prison Section Door

AddEntityCollideCallback("grunt_1" , "door_1" , "hitdoor" , false , 1);

hitdoor(asParent , asChild , alState);
{
AddLocalVarInt("HitNumber" , 1);
if(GetLocalVarInt("HitNumber")>=3){
// Grunt has hit the door 3 times
}
}
07-27-2011, 03:54 PM
Find
MrCookieh Offline
Member

Posts: 157
Threads: 8
Joined: Jul 2011
Reputation: 0
#16
RE: Prison Section Door

Okay I've set the grunt inactive instantly after bashing the door, and turning him active again, and now
he stops bashing the door.

Ahhh, I've never thought that this would work! Thank you very much!

The Well: Descent - Take a look at it!
07-28-2011, 10:56 AM
Find
MrCookieh Offline
Member

Posts: 157
Threads: 8
Joined: Jul 2011
Reputation: 0
#17
RE: Prison Section Door

(07-27-2011, 03:54 PM)Grimstoll Wrote: AddEntityCollideCallback("grunt_1" , "door_1" , "hitdoor" , false , 1);

hitdoor(asParent , asChild , alState);
{
AddLocalVarInt("HitNumber" , 1);
if(GetLocalVarInt("HitNumber")>=3){
// Grunt has hit the door 3 times
}
}

Hmm, this doesn't work, it seems that the grunt doesn't 'touch' the door...

The Well: Descent - Take a look at it!
07-31-2011, 09:59 AM
Find
DRedshot Offline
Senior Member

Posts: 374
Threads: 23
Joined: Jun 2011
Reputation: 11
#18
RE: Prison Section Door

try:

AddEntityCollideCallback("grunt_1" , "doorArea" , "hitdoor" , false , 1);

hitdoor(asParent , asChild , alState);
{
AddLocalVarInt("HitNumber" , 1);
if(GetLocalVarInt("HitNumber")>=3){
// Grunt has hit the door 3 times
}
}

just make an area in front of the door

(This post was last modified: 07-31-2011, 12:23 PM by DRedshot.)
07-31-2011, 12:22 PM
Find
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#19
RE: Prison Section Door

hitdoor(asParent , asChild , alState);
{
AddLocalVarInt("HitNumber" , 1);
if(GetLocalVarInt("HitNumber")>=3){
// Grunt has hit the door 3 times
}
}

This is wrong...

Try this:

void hitdoor(string &in asParent, string &in asChild, int alState)
{
     AddLocalVarInt("HitNumber", 1);
     if (GetLocalVarInt("HitNumber") == 3)
     {
          SetPropHealth("DoorName", 0);
     }
}

By the way, what if the door is already open? What are you going to do then? Add it to the script? You can simply have the monster stand there as the game simulates the monster hitting it each time with the monster just standing right outside of the door until the door is broken down, then the monster continues on his path.

(This post was last modified: 07-31-2011, 02:16 PM by Kyle.)
07-31-2011, 02:13 PM
Find
MrCookieh Offline
Member

Posts: 157
Threads: 8
Joined: Jul 2011
Reputation: 0
#20
RE: Prison Section Door

Well, we are talking about a prisoner door, that can't be destroyed by grunts.
(Also I somehow think, that in the main story, a grunt can destroy the last door in the prison, although
it's a prison door...)
We already tried the SetPropHealth(...); But it somehow can't be destroyed, that's why I want to simulate
him breaking the door via trigger.
And the door is locked, it can't be opened.

The Well: Descent - Take a look at it!
07-31-2011, 03:36 PM
Find




Users browsing this thread: 2 Guest(s)