Frictional Games Forum (read-only)

Full Version: monster
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
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.
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)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!"
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
(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.
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
(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);
}
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
(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.

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'?
Pages: 1 2