Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
monster
Author Message
Tirilno Offline
Junior Member

Posts: 27
Joined: Jul 2011
Reputation: 0
Post: #1
monster
Ehm.. I'm wondring about how I can make the monster destroy the boxes when it's chasing you, like in Justine. Anyone knows how? please help if you know anything.
07-26-2011 08:29 PM
Find all posts by this user Quote this message in a reply
Russ Money Offline
Senior Member

Posts: 360
Joined: Dec 2010
Reputation: 3
Post: #2
RE: monster
Do you mean something like this?

http://www.youtube.com/watch?v=FANr-XWaV...age#t=835s

It's essentially an area the player walks over and the boxes are set to 0 health. The monster is spawned behind those boxes.

07-26-2011 09:05 PM
Find all posts by this user Quote this message in a reply
Tirilno Offline
Junior Member

Posts: 27
Joined: Jul 2011
Reputation: 0
Post: #3
RE: monster
(07-26-2011 09:05 PM)Russ Money Wrote:  Do you mean something like this?

http://www.youtube.com/watch?v=FANr-XWaV...age#t=835s

It's essentially an area the player walks over and the boxes are set to 0 health. The monster is spawned behind those boxes.

No. If you have played justine, when malo are chasing you in the tunnel when you hear that he's smashing the boxes behind you and you're like "NOOOO! NO!! NO!! Don't kill me!! I'm dead!"
07-26-2011 09:23 PM
Find all posts by this user Quote this message in a reply
MrCookieh Offline
Member

Posts: 157
Joined: Jul 2011
Reputation: 0
Post: #4
RE: monster
I just think that they are in his way, and he pushes them away.
Don't know if it's possible to force a monster to destroy boxes

The Well: Descent - Take a look at it!
07-26-2011 09:29 PM
Find all posts by this user Quote this message in a reply
Tirilno Offline
Junior Member

Posts: 27
Joined: Jul 2011
Reputation: 0
Post: #5
RE: monster
(07-26-2011 09:29 PM)MrCookieh Wrote:  I just think that they are in his way, and he pushes them away.
Don't know if it's possible to force a monster to destroy boxes

It is. there are an area with this name around the boxes in that tunnel Area_EnemyBreaksThroughDebris_1 and in the script it is something too complicated for me to understand since I'm new at script and that. Read yourself(if you have justine) under

//////////////////////////////////////////////////////////
// TUNNEL CHASE
//////////////////////////////////////////////////////////

in 03_Dungeon.hps.
07-26-2011 09:36 PM
Find all posts by this user Quote this message in a reply
MrCookieh Offline
Member

Posts: 157
Joined: Jul 2011
Reputation: 0
Post: #6
RE: monster
okay, it seems, that the boxes in certain areas get destroyed by this command:
SetPropHealth("a"+iArea+"b_*", 0);
So the health of the boxes are set to 0, and (I've never tried it) they get destroyed by this.

Try to add this line:
SetPropHealth("nameofyourbox", 0);
and watch if it gets destroyed. But be sure to uncheck the disableBreakable in the entity's menu of your box

The Well: Descent - Take a look at it!
(This post was last modified: 07-26-2011 09:46 PM by MrCookieh.)
07-26-2011 09:46 PM
Find all posts by this user Quote this message in a reply
Tirilno Offline
Junior Member

Posts: 27
Joined: Jul 2011
Reputation: 0
Post: #7
RE: monster
(07-26-2011 09:46 PM)MrCookieh Wrote:  okay, it seems, that the boxes in certain areas get destroyed by this command:
SetPropHealth("a"+iArea+"b_*", 0);
So the health of the boxes are set to 0, and (I've never tried it) they get destroyed by this.

Try to add this line:
SetPropHealth("nameofyourbox", 0);
and watch if it gets destroyed. But be sure to uncheck the disableBreakable in the entity's menu of your box

nope it doesn't work..I get an error when I try to go into the room. I tried to name my boxes like in the game:
a1b_1 in Area_EnemyBreaksThroughDebris_1
a2b_1 in Area_EnemyBreaksThroughDebris_2
a3b_1 in Area_EnemyBreaksThroughDebris_3
and leaved the SetPropHealth("a"+iArea+"b_*", 0); at that. so my script is now:

void CollideEnemyEndCrash(string &in asParent, string &in asChild, int alState)
{
(asChild == "Area_EnemyBreaksThroughDebris_1")
BreakTunnelBoxEffect(asChild, 1);

(asChild == "Area_EnemyBreaksThroughDebris_2")
BreakTunnelBoxEffect(asChild, 2);

(asChild == "Area_EnemyBreaksThroughDebris_3")
BreakTunnelBoxEffect(asChild, 3);
}

void BreakTunnelBoxEffect(string &in sEntity, int iArea)
{
PlaySoundAtEntity("bangs", "break_wood_metal", sEntity, 0.0f, false);
PlaySoundAtEntity("bangs", "attack_launch", sEntity, 0.0f, false);
SetPropHealth("a"+iArea+"b_*", 0);
StartScreenShake(0.05f, 0.4f, 0.2f, 0.6f);
}
07-26-2011 10:37 PM
Find all posts by this user Quote this message in a reply
MrCookieh Offline
Member

Posts: 157
Joined: Jul 2011
Reputation: 0
Post: #8
RE: monster
not sure if it's possible to write like that, but aren't the if missing?

if(asChild == "Area_EnemyBreaksThroughDebris_1"){
BreakTunnelBoxEffect(asChild, 1);
}

I always write it like that, so I dunno if this is just another way to type it

The Well: Descent - Take a look at it!
07-26-2011 10:51 PM
Find all posts by this user Quote this message in a reply
Tirilno Offline
Junior Member

Posts: 27
Joined: Jul 2011
Reputation: 0
Post: #9
RE: monster
(07-26-2011 10:51 PM)MrCookieh Wrote:  not sure if it's possible to write like that, but aren't the if missing?

if(asChild == "Area_EnemyBreaksThroughDebris_1"){
BreakTunnelBoxEffect(asChild, 1);
}

I always write it like that, so I dunno if this is just another way to type it
I didn't get any error, thanks Tongue But the boxes didn't break or something.
07-26-2011 11:10 PM
Find all posts by this user Quote this message in a reply
MrCookieh Offline
Member

Posts: 157
Joined: Jul 2011
Reputation: 0
Post: #10
RE: monster
Hmm, I have no clue, maybe you could compare the different options of the boxes (yours and the boxes of justine)
Maybe they are special boxes, already looked in the entity tab 'ptest'?

The Well: Descent - Take a look at it!
07-27-2011 11:03 AM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)