checking for erors

Topics regarding Scripting with Reality Factory
Post Reply
Veleran
Posts: 891
Joined: Mon Aug 22, 2005 10:22 am
Location: Greece

checking for erors

Post by Veleran » Fri Oct 07, 2011 4:08 am

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

} 

Allanon
Posts: 493
Joined: Mon Aug 29, 2005 8:23 am

Re: checking for erors

Post by Allanon » Fri Oct 07, 2011 7:22 am

Does the barrel actor have a "BONE02"? In the second script it uses "BONE03".

Veleran
Posts: 891
Joined: Mon Aug 22, 2005 10:22 am
Location: Greece

Re: checking for erors

Post by Veleran » Fri Oct 07, 2011 11:23 pm

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.

Post Reply