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
monster
Tirilno Offline
Junior Member

Posts: 27
Threads: 5
Joined: Jul 2011
Reputation: 0
#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


Messages In This Thread
monster - by Tirilno - 07-26-2011, 08:29 PM
RE: monster - by Russ Money - 07-26-2011, 09:05 PM
RE: monster - by Tirilno - 07-26-2011, 09:23 PM
RE: monster - by MrCookieh - 07-26-2011, 09:29 PM
RE: monster - by Tirilno - 07-26-2011, 09:36 PM
RE: monster - by MrCookieh - 07-26-2011, 09:46 PM
RE: monster - by Tirilno - 07-26-2011, 10:37 PM
RE: monster - by MrCookieh - 07-26-2011, 10:51 PM
RE: monster - by Tirilno - 07-26-2011, 11:10 PM
RE: monster - by MrCookieh - 07-27-2011, 11:03 AM
RE: monster - by Tirilno - 07-27-2011, 11:20 AM



Users browsing this thread: 1 Guest(s)