It doesn't work
It doesn't says that you can't combine the items but nothing happens
What I've done wrong there?
////////////////////////////
// Run first time starting map
void OnStart()
{
SetLightVisible("PointLight_8", false);
SetEntityPlayerInteractCallback("Expoxy", "Interact", true);
AddUseItemCallback("", "Spreng", "compound_1", "Bunsenbrenner", true);
AddCombineCallback("", "Flasche", "Chemie", "Sprenger", false);
AddUseItemCallback("", "chemical_container_expoxy_1", "cave_in_1", "Sprengsatz", true);
AddEntityCollideCallback("Player", "ScriptArea_22", "Damage", true, 1);
}
void Sprenger(string &in asItemA, string &in asItemB)
{
RemoveItem("Chemie");
RemoveItem("Flasche");
GiveItem("Spreng", "chemical_container_half.ent", "", "chemical_container_half.tga", 1);
}
void Bunsenbrenner(string &in asItem, string &in asEntity)
{
FadeInSound("Bun", 0.5f, true);
SetEntityActive("Bunsa", true);
PlaySoundAtEntity("Bun", "puzzle_gas.snt", "Bunsa", 0, false);
AddTimer("", 1.6, "Finished");
}
void Finished(string &in asTimer)
{
RemoveItem("Spreng");
GiveItem("", "chemical_container_expoxy_1", "", "chemical_container_epoxy.tga", 1);
SetEntityActive("Bunsa", false);
StopSound("Bun", 2.0f);
}
void Sprengsatz(string &in asItem, string &in asEntity)
{
SetEntityActive("Expoxy", true);
PlaySoundAtEntity("", "step_run_dirt.snt", "ScriptArea_20", 0, false);
StartPlayerLookAt("ScriptArea_20", 2, 4, "StopPlayerLookAt");
}
void Interact(string &in asEntity)
{
AddTimer("", 3, "Explosion");
PlaySoundAtEntity("", "12_epoxy_blow.snt", "ScriptArea_20", 0, false);
}
void Explosion(string &in asTimer)
{
SetEntityActive("ScriptArea_22", true);
SetEntityActive("web_1", false);
SetEntityActive("Destroyer", true);
SetEntityActive("cave_in_1", false);
CreateParticleSystemAtEntity("", "Explosion.ps", "ScriptArea_21", false);
CreateParticleSystemAtEntity("", "ps_dust_elevator_crash.ps", "ScriptArea_21", false);
SetEntityActive("Box", false);
PlaySoundAtEntity("", "explosion_rock_large.snt", "ScriptArea_20", 0, false);
SetLightVisible("PointLight_8", true);
AddTimer("", 1, "LightOut");
}
void LightOut(string &in asTimer)
{
SetEntityActive("ScriptArea_22", false);
SetLightVisible("PointLight_8", false);
}
void Damage(string &in asItem, string &in asEntity)
{
GivePlayerDamage(120.9f, "damage_bloodsplat0.tga", true, true);
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}