Code: Select all
{
Spawn[ ()
{
Console(true);
BoxWidth(32); // set bounding box width/depth
SetNoCollision();
NewOrder("Wait");
} ]
Wait[ ()
{
PlayAnimation("Idle", false, "");
PlayerDistOrder(64, "Break");
} ]
Break[()
{
Gravity(false);
AddExplosion("Barrel_2_Lid_Explosion","BONE02",0,0,0);
Remove(true);
} ]
}
But,this one works,and even is simple one piece barrel that explodes whole i will use it for the moment.
Code: Select all
{
Spawn[ ()
{
Console(false);
BoxWidth(44); // set bounding box width/depth
Gravity(true);
NewOrder("Wait");
} ]
Wait[ ()
{
PlayAnimation("Idle", false, "");
AttributeOrder("health", 5, "Break");
} ]
Break[()
{
SetNoCollision();
AddExplosion("Barrel_2_Lid_Explosion","BONE03",0,0,0);
AddExplosion("Barrel_2_Bottom_Explosion","BONE03",0,0,0);
switch(random(0,1)) // choose between two triggers
{
case 0
{
SetEventState("Barrel_2_3_trigger1",true);
}
case 1
{
SetEventState("Barrel_2_3_trigger2",true);
}
}
Remove(true);
} ]
}