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
Help with breakable wall!!
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#5
RE: Help with breakable wall!!

(04-13-2013, 06:11 PM)VeNoMzTeamHysterical Wrote: Script to break wall with hammer

Spoiler below!

{
AddUseItemCallback("", "stone_hammer_1", "cell_breakable_wall_1", "BreakWall", true);
}

void BreakWall(string &in asItem, string &in asEntity)
{
SetPropHealth("cell_breakable_wall_1", 0);
SetEntityActive("fragment1",true);
SetEntityActive("fragment2",true);
SetEntityActive("fragment3",true);
CreateParticleSystemAtEntity("", "ps_dust_impact.ps", "impact", false);
}


Make a script area called Impact on the wall so there is gonna be dust.
Also name brick pieces frament1/2/3 you can make more if you liked to.
YOU. READ. IT. WRONG. He wants the wall to be crushed by ANYTHING.
Create an area at the part where it's supposed to appear.
And now, try this one out.
Spoiler below!

PHP Code: (Select All)
void OnStart()
{
AddEntityCollideCallback("""AREANAME""WallCrush"true1); //Change AREANAME to your area's name at the part where you want it to be crushed.
}

void WallCrush(string &in asParentstring &in asChildint alState)
{
SetPropHealth("cell_breakable_wall_1"0); //Sets the wall to destruct
SetEntityActive("Fragment_1"true); //Fragment #1 that will appear
SetEntityActive("Fragment_2"true); //Fragment #2 that will appear
SetEntityActive("Fragment_3"true); //Fragment #3 that will appear
CreateParticleSystemAtEntity("""ps_dust_impact.ps""AREANAME2"false); //Creates a particle to add some dust particles
//And change AREANAME2 to whatever your area's name is. You can place it in front of the wall but it's better if it covered the entire hole.



"Veni, vidi, vici."
"I came, I saw, I conquered."
(This post was last modified: 04-14-2013, 12:14 AM by PutraenusAlivius.)
04-14-2013, 12:13 AM
Find


Messages In This Thread
Help with breakable wall!! - by AtraNox - 04-13-2013, 05:25 PM
RE: Help with breakable wall!! - by i3670 - 04-13-2013, 05:33 PM
RE: Help with breakable wall!! - by AtraNox - 04-13-2013, 05:40 PM
RE: Help with breakable wall!! - by PutraenusAlivius - 04-14-2013, 12:13 AM



Users browsing this thread: 1 Guest(s)