Mixing chemicals problem ! 
			 
			
				So I need to know why this is Not working? 
 
Script: 
 
void OnStart() 
{ 
	//if(ScriptDebugOn()) 
	//{ 
	//	GiveItemFromFile("lantern", "lantern.ent"); 
 	//	for(int i=0;i<10;i++) GiveItemFromFile("tinderbox_"+i, "tinderbox.ent"); 
	//	SetEntityActive("chemical_container_full_1", true); 
	//	SetEntityActive("glass_container_mix_done_2", true); 
	//} 
	SetLocalVarInt("EpoxyNumber", 0); 
	AddEntityCollideCallback("Player", "ExplosiveQuest", "AddQuest", true, 1); 
	AddUseItemCallback("", "kainite_1", "extaction_oven_1", "AddKainitetoOven", true); 
	AddUseItemCallback("", "chemical_container_1", "extaction_oven_1", "PutContainerUnderExtractor", true); 
	AddEntityCollideCallback("extaction_oven_lever_1", "ScriptArea_1", "Extraction1", false, 1); 
 
	AddUseItemCallback("", "glass_container_1", "epoxy_container01_1", "UseEmptyContainerOnEpoxyContainer", true); 
	AddUseItemCallback("", "glass_container_1", "epoxy_container02_1", "UseEmptyContainerOnEpoxyContainer", true); 
	AddUseItemCallback("", "glass_container_mix_notdone_1", "epoxy_container01_1", "UseEmptyContainerOnEpoxyContainer", true); 
	AddUseItemCallback("", "glass_container_mix_notdone_2", "epoxy_container02_1", "UseEmptyContainerOnEpoxyContainer", true); 
	 
	AddUseItemCallback("", "glass_container_blood_1", "cave_in_1", "UseExplosiveOnRocks", true); 
	AddEntityCollideCallback("Player", "explosivegood", "BOOM", false, 1); 
} 
 
void AddQuest(string &in asParent, string &in asChild, int alState) 
{ 
	AddQuest("ExplosiveQuest", "ExplosiveQuest"); 
} 
 
void InteractGlassContainer(string &in asEntity) 
{ 
	SetEntityActive("servant_grunt_1", true); 
	AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0.1, ""); 
	AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 2, ""); 
	AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0.1, ""); 
	AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_4", 0.1, ""); 
	AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_5", 6, ""); 
	AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_6", 0.1, ""); 
	AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_7", 0.1, ""); 
	AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_8", 0.1, ""); 
} 
 
void AddKainitetoOven(string &in asItem, string &in asEntity) 
{ 
	RemoveItem("kainite_1"); 
	SetEntityActive("flask01_2", true); 
	AddLocalVarInt("KainiteInExtractor", 1); 
} 
 
void PutContainerUnderExtractor(string &in asItem, string &in asEntity) 
{ 
	RemoveItem("chemical_container_1"); 
	SetEntityActive("chemical_container_static_1", true); 
	AddLocalVarInt("ContainerUnderExtractor", 1); 
} 
 
void Extraction1(string &in asParent, string &in asChild, int alState) 
{ 
	if(GetLocalVarInt("KainiteInExtractor") == 1 && GetLocalVarInt("ContainerUnderExtractor") == 1) 
	{ 
		PlaySoundAtEntity("", "12_epoxy_fill.snt", "chemical_container_static_1", 0, false); 
		SetEntityActive("ScriptArea_1", false); 
		SetEntityActive("flask01_2", false); 
		SetEntityActive("chemical_container_static_1", false); 
		SetEntityActive("chemical_container_full_1", true); 
	} 
	else if(GetLocalVarInt("KainiteInExtractor") != 1 && GetLocalVarInt("ContainerUnderExtractor") == 1) 
	{ 
		SetMessage("Messages", "AddKainite", 0); 
	} 
	else if(GetLocalVarInt("ContainerUnderExtractor") != 1 && GetLocalVarInt("KainiteInExtractor") == 1) 
	{ 
		SetMessage("Messages", "AddContainer", 0); 
	} 
	else 
	{ 
		SetMessage("Messages", "AddBoth", 0); 
	} 
} 
 
void UseEmptyContainerOnEpoxyContainer(string &in asItem, string &in asEntity) 
{ 
	if(GetLocalVarInt("EpoxyNumber") == 0 && asEntity == "epoxy_container01_1") 
	{ 
		CreateParticleSystemAtEntity("Drip1_1", "ps_liquid_epoxy_drip", "EpoxyDrip_1", true); 
		StartPlayerLookAt("glass_container_mix_notdone_2", 2, 2, ""); 
		SetEntityActive("glass_container_mix_notdone_2", true); 
		RemoveItem(asItem); 
		SetLocalVarInt("EpoxyNumber", 1); 
		AddTimer("donelook", 1.5f, "EpoxyTimer"); 
	} 
	else if(GetLocalVarInt("EpoxyNumber") == 0 && asEntity == "epoxy_container02_1") 
	{ 
		CreateParticleSystemAtEntity("Drip1_2", "ps_liquid_epoxy_drip", "EpoxyDrip_2", true); 
		StartPlayerLookAt("glass_container_mix_notdone_1", 2, 2, ""); 
		SetEntityActive("glass_container_mix_notdone_1", true); 
		RemoveItem(asItem); 
		SetLocalVarInt("EpoxyNumber", 1); 
		AddTimer("donelook", 1.5f, "EpoxyTimer"); 
	} 
	else if(GetLocalVarInt("EpoxyNumber") == 1 && asEntity == "epoxy_container01_1") 
	{ 
		CreateParticleSystemAtEntity("Drip2_1", "ps_liquid_epoxy_drip", "EpoxyDrip_1", true); 
		StartPlayerLookAt("glass_container_mix_done_2", 2, 2, ""); 
		SetEntityActive("glass_container_mix_done_2", true); 
		RemoveItem(asItem); 
		SetLocalVarInt("EpoxyNumber", 2); 
		AddTimer("donelook", 1.5f, "EpoxyTimer");	 
	} 
	else if(GetLocalVarInt("EpoxyNumber") == 1 && asEntity == "epoxy_container02_1") 
	{ 
		CreateParticleSystemAtEntity("Drip2_2", "ps_liquid_epoxy_drip", "EpoxyDrip_2", true); 
		StartPlayerLookAt("glass_container_mix_done_1", 2, 2, ""); 
		SetEntityActive("glass_container_mix_done_1", true); 
		RemoveItem(asItem); 
		SetLocalVarInt("EpoxyNumber", 2); 
		AddTimer("donelook", 1.5f, "EpoxyTimer");	 
	} 
	else if(GetLocalVarInt("EpoxyNumber") == 2) 
	{ 
		SetMessage("Messages", "EpoxyFull", 0); 
	} 
} 
 
void EpoxyTimer(string &in asTimer) 
{ 
	StopPlayerLookAt(); 
	DestroyParticleSystem("Drip1_1"); 
	DestroyParticleSystem("Drip1_2"); 
	DestroyParticleSystem("Drip2_1"); 
	DestroyParticleSystem("Drip2_2"); 
} 
 
void UseExplosiveOnRocks(string &in asItem, string &in asEntity) 
{ 
	RemoveItem(asItem); 
	SetEntityActive("explosive_static", true); 
	SetLocalVarInt("ExplosiveReady", 1); 
} 
 
void BOOM(string &in asParent, string &in asChild, int alState) 
{ 
	if(GetLocalVarInt("ExplosiveReady") == 1) 
	{ 
		StartPlayerLookAt("AreaLookAt", 4, 4, ""); 
		PlaySoundAtEntity("epoxyignite", "12_epoxy_blow", "cave_in_1", 0, false); 
		AddTimer("donelook", 2, "TimerDoneLookAt"); 
	} 
} 
 
void TimerDoneLookAt(string &in asTimer) 
{ 
	StopPlayerLookAt(); 
	StartScreenShake(0.08, 2.5f, 0, 1.0f); 
	CreateParticleSystemAtEntity("", "ps_break_cavein", "AreaLookAt", false); 
	SetEntityActive("cave_in_1", false); 
	SetEntityActive("cave_in_destroyed_1", true); 
	SetEntityActive("explosive_static", false); 
	CompleteQuest("ExplosiveQuest", "ExplosiveQuest"); 
	SetLocalVarInt("ExplosiveReady", 0); 
} 
 
Inventory.hps file: 
 
void OnGameStart() 
{ 
	AddCombineCallback("", "chemical_container_full_1", "glass_container_mix_done_1", "CombineExplosive", false); 
	AddCombineCallback("", "chemical_container_full_1", "glass_container_mix_done_2", "CombineExplosive", false); 
} 
 
void CombineExplosive(string &in asItemA, string &in asItemB) 
{ 
	RemoveItem(asItemA); 
	RemoveItem(asItemB); 
	GiveItem("glass_container_blood_1", "Puzzle", "explosive", "glass_container_blood.tga", 0); 
} 
 
I can fill container those two liquids and then "Put" that "kainite" extaction oven then "flash" becames active but then I try to mix that "container on oven but "I can't" It's not working where is the problem? 
 
Thanks. 
			 
			
			
 
“Life is a game, play it” 
			
		 |