Sigh, I can't figure this out.
This is so complicated!
![Huh Huh](https://www.frictionalgames.com/forum/images/smilies/huh.gif)
I'm starting to feel embarrassed to bother you guys for so long. People must appreciate alot that you spend so much time with people that are bad at scripting like I am.
Honestly, I have no idea what you meant in your latest post. I don't understand English very well, I'm finnish.
EDIT:
HOORAY IT WORKS!
![Big Grin Big Grin](https://www.frictionalgames.com/forum/images/smilies/biggrin.gif)
void OnStart()
{
SetLocalVarInt("Var1", 0);
for(int i=1;i<=4;i++) AddUseItemCallback("Chemicals", "Chem"+i, "GetAcidComplete", "UsedChemsOnPot", true);
}
void UsedChemsOnPot(string &in asItem, string &in asEntity)
{
if (asItem == "Chem1")
{
AddLocalVarInt("Var1", 1);
RemoveItem("Chem1");
PlaySoundAtEntity("", "unlock_door.snt", "Player", 0, false);
}
else if (asItem == "Chem2")
{
AddLocalVarInt("Var1", 1);
RemoveItem("Chem2");
PlaySoundAtEntity("", "unlock_door.snt", "Player", 0, false);
}
else if (asItem == "Chem3")
{
AddLocalVarInt("Var1", 1);
RemoveItem("Chem3");
PlaySoundAtEntity("", "unlock_door.snt", "Player", 0, false);
}
else if (asItem == "Chem4")
{
AddLocalVarInt("Var1", 1);
RemoveItem("Chem4");
PlaySoundAtEntity("", "unlock_door.snt", "Player", 0, false);
}
if(GetLocalVarInt("Var1") == 4)
{
GiveSanityBoostSmall();
SetEntityActive("GetAcidComplete", false);
SetEntityActive("chemical_container_full_1", true);
PlayMusic("26_event_agrippa_head.ogg", false, 0.7, 0.1, 10, false);
}
}
Thank you so much for helping me out guys!