Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script help
Rakez68 Offline
Junior Member

Posts: 11
Threads: 3
Joined: Mar 2013
Reputation: 0
#7
RE: Script help

It does load the map fine now. And I understand now the issue. But I have another problem now, something I can't understand.

I pick up all four chemicals, and I try to put them into the pot (which is on the table). There does not come text ''Cannot use this item this way.'' But the SECOND time I try, there comes the text.
The item does not disappear from my inventory, and no sound effect plays.
After putting all four chemicals to the pot, nothing happens. It is supposed to play the event after all 4 chemicals have been put into the pot.

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("asParent" == "Chem1" && GetLocalVarInt("Var1") == 1)

{
AddLocalVarInt("Var1", 1);
RemoveItem("Chem1");
PlaySoundAtEntity("", "unlock_door.snt", "Player", 0, false);
}
else if("asParent" == "Chem2" && GetLocalVarInt("Var1") == 1)
{
AddLocalVarInt("Var1", 1);
RemoveItem("Chem2");
PlaySoundAtEntity("", "unlock_door.snt", "Player", 0, false);
}
else if("asParent" == "Chem3" && GetLocalVarInt("Var1") == 1)
{
AddLocalVarInt("Var1", 1);
RemoveItem("Chem3");
PlaySoundAtEntity("", "unlock_door.snt", "Player", 0, false);
}
else if("asParent" == "Chem4" && GetLocalVarInt("Var1") == 1)
{
AddLocalVarInt("Var1", 1);
RemoveItem("Chem4");
PlaySoundAtEntity("", "unlock_door.snt", "Player", 0, false);
}

if(GetLocalVarInt("Var1") == 4)
{
GiveSanityBoostSmall();
SetEntityActive("GetAcidComplete", false);
PlayMusic("26_event_agrippa_head.ogg", false, 0.7, 0.1, 10, false);
}
}
03-27-2013, 03:23 PM
Find


Messages In This Thread
Script help - by Rakez68 - 03-27-2013, 01:36 PM
RE: Script help - by Adrianis - 03-27-2013, 01:56 PM
RE: Script help - by Rakez68 - 03-27-2013, 02:08 PM
RE: Script help - by Adrianis - 03-27-2013, 02:15 PM
RE: Script help - by Rakez68 - 03-27-2013, 02:46 PM
RE: Script help - by PutraenusAlivius - 03-27-2013, 02:55 PM
RE: Script help - by Rakez68 - 03-27-2013, 03:23 PM
RE: Script help - by PutraenusAlivius - 03-27-2013, 03:27 PM
RE: Script help - by Rakez68 - 03-27-2013, 03:39 PM
RE: Script help - by PutraenusAlivius - 03-27-2013, 03:40 PM
RE: Script help - by Rakez68 - 03-27-2013, 04:09 PM
RE: Script help - by Adrianis - 03-27-2013, 04:11 PM
RE: Script help - by Rakez68 - 03-27-2013, 04:50 PM
RE: Script help - by Adrianis - 03-27-2013, 05:44 PM



Users browsing this thread: 1 Guest(s)