Page 1 of 1

checking for erors

Posted: Fri Oct 07, 2011 4:08 am
by Veleran
The barrel lid pawn is to be removed when player goes near but i get some crash when its about to explode and no message is written in the log..could be something else i dont know yet.

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);
      } ]

} 

Re: checking for erors

Posted: Fri Oct 07, 2011 7:22 am
by Allanon
Does the barrel actor have a "BONE02"? In the second script it uses "BONE03".

Re: checking for erors

Posted: Fri Oct 07, 2011 11:23 pm
by Veleran
Its has them but nevermind,i will avoid complicated things like having the barrel lid as separate to make a pawn come out of it.
I made the barrel as single piece to explode and disappear,and the pawns can spawn in the smoke of the barrel explosion.