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
Mixing chemicals problem !
HumiliatioN Offline
Posting Freak

Posts: 1,179
Threads: 64
Joined: Dec 2010
Reputation: 18
#1
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”
08-05-2011, 04:49 PM
Find
HumiliatioN Offline
Posting Freak

Posts: 1,179
Threads: 64
Joined: Dec 2010
Reputation: 18
#2
RE: Mixing chemicals problem !

Hey! Can anybody help me I'm stuck with this chemical puzzle thing. Damn.

“Life is a game, play it”
08-07-2011, 01:48 PM
Find
Apjjm Offline
Is easy to say

Posts: 496
Threads: 18
Joined: Apr 2011
Reputation: 52
#3
RE: Mixing chemicals problem !

(08-07-2011, 01:48 PM)HumiliatioN Wrote: Hey! Can anybody help me I'm stuck with this chemical puzzle thing. Damn.

Is your oven called "extraction_oven_1" or "extaction_oven_1"?
(This post was last modified: 08-07-2011, 04:06 PM by Apjjm.)
08-07-2011, 04:02 PM
Find
HumiliatioN Offline
Posting Freak

Posts: 1,179
Threads: 64
Joined: Dec 2010
Reputation: 18
#4
RE: Mixing chemicals problem !

(08-07-2011, 04:02 PM)Apjjm Wrote:
(08-07-2011, 01:48 PM)HumiliatioN Wrote: Hey! Can anybody help me I'm stuck with this chemical puzzle thing. Damn.

Is your oven called "extraction_oven_1" or "extaction_oven_1"?

Extaction_oven_1? What about that?

“Life is a game, play it”
(This post was last modified: 08-07-2011, 08:15 PM by HumiliatioN.)
08-07-2011, 08:14 PM
Find
Apjjm Offline
Is easy to say

Posts: 496
Threads: 18
Joined: Apr 2011
Reputation: 52
#5
RE: Mixing chemicals problem !

(08-07-2011, 08:14 PM)HumiliatioN Wrote:
(08-07-2011, 04:02 PM)Apjjm Wrote:
(08-07-2011, 01:48 PM)HumiliatioN Wrote: Hey! Can anybody help me I'm stuck with this chemical puzzle thing. Damn.

Is your oven called "extraction_oven_1" or "extaction_oven_1"?

Extaction_oven_1? What about that?
I was guessing you made a typo in the script, because calling the object in the map "extraction_oven_1" would make more sense considering you spelled it correctly everywhere else? You might want to double check that the names are exactly the same including case. Failing that, it is most likely still a problem with the callback being triggered in the first place. You will want to put debug messages in your script, one per function, to track what is actually getting triggered.
(This post was last modified: 08-07-2011, 08:26 PM by Apjjm.)
08-07-2011, 08:23 PM
Find
HumiliatioN Offline
Posting Freak

Posts: 1,179
Threads: 64
Joined: Dec 2010
Reputation: 18
#6
RE: Mixing chemicals problem !

(08-07-2011, 08:23 PM)Apjjm Wrote:
(08-07-2011, 08:14 PM)HumiliatioN Wrote:
(08-07-2011, 04:02 PM)Apjjm Wrote:
(08-07-2011, 01:48 PM)HumiliatioN Wrote: Hey! Can anybody help me I'm stuck with this chemical puzzle thing. Damn.

Is your oven called "extraction_oven_1" or "extaction_oven_1"?

Extaction_oven_1? What about that?
I was guessing you made a typo in the script, because calling the object in the map "extraction_oven_1" would make more sense considering you spelled it correctly everywhere else? You might want to double check that the names are exactly the same including case. Failing that, it is most likely still a problem with the callback being triggered in the first place. You will want to put debug messages in your script, one per function, to track what is actually getting triggered.

Oh found the problem. That Debug message thing is very good ! Thanks for help !

“Life is a game, play it”
08-07-2011, 08:43 PM
Find
Selyp Offline
Member

Posts: 210
Threads: 19
Joined: Feb 2011
Reputation: 7
#7
RE: Mixing chemicals problem !

What was the problem? I am having a similar problem and would like to know how you fixed it.

Atlantia - An Amnesia: The Dark Descent Full Conversion Mod
08-07-2011, 11:45 PM
Find
HumiliatioN Offline
Posting Freak

Posts: 1,179
Threads: 64
Joined: Dec 2010
Reputation: 18
#8
RE: Mixing chemicals problem !

(08-07-2011, 11:45 PM)Selyp Wrote: What was the problem? I am having a similar problem and would like to know how you fixed it.

That "Exctation" / "Exctraction" I have named wrong that. But show that script if you want. Tongue

I can try to help you.

“Life is a game, play it”
08-08-2011, 12:04 AM
Find
Selyp Offline
Member

Posts: 210
Threads: 19
Joined: Feb 2011
Reputation: 7
#9
RE: Mixing chemicals problem !

My script is

void OnGameStart()
{
AddCombineCallback("", "Vinegar", "PhosphoricAcid", "CombineFunc", true);
}
void CombineFunc(string &in asItemA,string &in asItemB)
{
SetMessage ("Descriptions", "Piano", 10);
GiveSanityBoost();
RemoveItem("Vinegar");
RemoveItem("PhosphoricAcid");
GiveItem("", bucket_of_tar", "bucket_of_tar", "bucket_of_tar.tga", 1);
}

The message is just there so I can determine if the function is being called. Since it's not showing up I'm assuming that the function is being called at all, which is strange because I am positive the names of the items are correct. I have triple checked them multiple times lol.

Atlantia - An Amnesia: The Dark Descent Full Conversion Mod
08-08-2011, 12:08 AM
Find
HumiliatioN Offline
Posting Freak

Posts: 1,179
Threads: 64
Joined: Dec 2010
Reputation: 18
#10
RE: Mixing chemicals problem !

(08-08-2011, 12:08 AM)Selyp Wrote: My script is

void OnGameStart()
{
AddCombineCallback("", "Vinegar", "PhosphoricAcid", "CombineFunc", true);
}
void CombineFunc(string &in asItemA,string &in asItemB)
{
SetMessage ("Descriptions", "Piano", 10);
GiveSanityBoost();
RemoveItem("Vinegar");
RemoveItem("PhosphoricAcid");
GiveItem("", bucket_of_tar", "bucket_of_tar", "bucket_of_tar.tga", 1);
}

The message is just there so I can determine if the function is being called. Since it's not showing up I'm assuming that the function is being called at all, which is strange because I am positive the names of the items are correct. I have triple checked them multiple times lol.

Hmm.. This is strange. Maybe you have hps. file something wrong. Don't know really weird. Undecided

“Life is a game, play it”
08-08-2011, 01:23 AM
Find




Users browsing this thread: 1 Guest(s)