/* 
	PScript by Peter Pon
	
	scene23
*/
#include "..\PScriptLib\Def.h"

#include "..\PScriptLib\box.pst"
#include "..\PScriptLib\desk.pst"
#include "..\PScriptLib\chair.pst"
#include "..\PScriptLib\jug.pst"

Scene_OnInit()
{
	InitBoxes(g_iNumBoxes);
	InitBBoxes(g_iNumBBoxes);
	InitChairs(g_iNumChairs);
	InitDeskes(g_iNumDeskes);
	InitJugs(g_iNumJugs);

	SetSceneItem("D_wuqi02", "attribute", "active", 0);
	SetSceneItem("D_wuqi03", "attribute", "active", 0);
	SetSceneItem("D_wuqi04", "attribute", "active", 0);
	SetSceneItem("D_wuqi05", "attribute", "active", 0);

	SetSceneItem("D_Dummy01", "name", "machine");     
	SetSceneItem("D_Dummy01", "attribute", "collision", 1);
	SetSceneItem("D_Dummy01", "attribute", "visible", 0);

	SetSceneItem("D_Qiang", "name", "machine");
	SetSceneItem("D_Qiang", "attribute", "collision", 1);
	SetSceneItem("D_Qiang", "attribute", "visible", 0);
	SetSceneItem("D_Qiang", "attribute", "active", 0);
	SetSceneItem("D_Qiang", "attribute", "damage", 1);

	SetSceneItem("D_Qiang1", "name", "machine");
	SetSceneItem("D_Qiang1", "attribute", "collision", 1);
	SetSceneItem("D_Qiang1", "attribute", "visible", 0);
	SetSceneItem("D_Qiang1", "attribute", "active", 0);
	SetSceneItem("D_Qiang1", "attribute", "damage", 1);

	SetSceneItem("D_Qiang2", "name", "machine");
	SetSceneItem("D_Qiang2", "attribute", "collision", 1);
	SetSceneItem("D_Qiang2", "attribute", "visible", 0);
	SetSceneItem("D_Qiang2", "attribute", "active", 0);
	SetSceneItem("D_Qiang2", "attribute", "damage", 1);
}

ZMJAI_OnEvent(int zmjEvt)
{
	if(zmjEvt == 17)
	{
		SetSceneItem("D_wuqi02", "attribute", "active", 1);	
		SetSceneItem("D_wuqi03", "attribute", "active", 1);	
		SetSceneItem("D_wuqi04", "attribute", "active", 1);	
		SetSceneItem("D_wuqi05", "attribute", "active", 1);
		return 13;
	}
	if(zmjEvt == 18)
	{
		SetSceneItem("D_Qiang", "attribute", "active", 1);
		SetSceneItem("D_Qiang1", "attribute", "active", 1);
		SetSceneItem("D_Qiang2", "attribute", "active", 1);
		return 13;
	}
	if(zmjEvt == 19)
	{
		SetSceneItem("D_Qiang", "attribute", "active", 0);
		SetSceneItem("D_Qiang1", "attribute", "active", 0);
		SetSceneItem("D_Qiang2", "attribute", "active", 0);
		return 13;
	}
	return -1;
}
#include "..\PScriptLib\zmjeve.pst"