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
Why the hell does the combine not work?? :S
neocrawler Offline
Member

Posts: 57
Threads: 19
Joined: Sep 2011
Reputation: 1
#1
Why the hell does the combine not work?? :S

Why doesn't it remove the flasks?
void OnPickUpIngedient_4(string &in asEntity, string &in type)
{
AddLocalVarInt("Flask1", 1);
if (GetLocalVarInt("Flask1") == 4)
{
AddCombineCallback("", "flask01_cuprite_1", "chemical_container_half_1", "UseFlaskOnContainer", true);
AddCombineCallback("", "flask01_aqua_regia_1", "chemical_container_half_1", "UseFlaskOnContainer", true);
AddCombineCallback("", "flask01_calamine_1", "chemical_container_half_1", "UseFlaskOnContainer", true);
AddCombineCallback("", "flask01_orpiment_1", "chemical_container_half_1", "UseFlaskOnContainer", true);
}
}
void UseFlaskOnContainer(string &in asItemA, string &in asItemB)
{
RemoveItem("flask01_cuprite_1");
RemoveItem("flask01_aqua_regia_1");
RemoveItem("flask01_calamine_1");
RemoveItem("flask01_orpiment_1");
}
(This post was last modified: 07-19-2012, 08:14 PM by neocrawler.)
07-19-2012, 07:53 PM
Website Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#2
RE: Why the hell does the combine not work?? :S

Probably because GetLocalVarInt("Flask1") != 4. Can't figure it out with so little information.

Tutorials: From Noob to Pro
07-19-2012, 09:34 PM
Website Find
neocrawler Offline
Member

Posts: 57
Threads: 19
Joined: Sep 2011
Reputation: 1
#3
RE: Why the hell does the combine not work?? :S

nah don't think its that one. I allready tested that one with SetPlayerActive(false); and when I picked up the fourt jar my player went unactive :/
07-19-2012, 09:50 PM
Website Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#4
RE: Why the hell does the combine not work?? :S

Just to make sure, did you try to combine any of the items after picking up each "Ingedient"?

Tutorials: From Noob to Pro
07-19-2012, 10:33 PM
Website Find
neocrawler Offline
Member

Posts: 57
Threads: 19
Joined: Sep 2011
Reputation: 1
#5
RE: Why the hell does the combine not work?? :S

I didn't try before I picked up all four of them Tongue
07-19-2012, 10:54 PM
Website Find
ksnider Offline
Junior Member

Posts: 9
Threads: 0
Joined: Jul 2012
Reputation: 0
#6
RE: Why the hell does the combine not work?? :S

You need to have all combine callbacks in a file named "inventory.hps", and it needs to be placed in (custom_stories/"StoryName"/maps).

If you want to be able to combine the jars after picking up all four, then put this in your "inventory.hps".

void OnStart()
{
SetLocalVarInt("Flask1", 0);
SetEntityCallbackFunc("flask01_cuprite_1", "OnPickUpIngedient");
SetEntityCallbackFunc("flask01_aqua_regia_1", "OnPickUpIngedient");
SetEntityCallbackFunc("flask01_calamine_1", "OnPickUpIngedient");
SetEntityCallbackFunc("flask01_orpiment_1", "OnPickUpIngedient");
}

void OnPickUpIngedient(string &in asEntity, string &in type)
{
AddLocalVarInt("Flask1", 1);
func_01();
}

void func_01()
{
  if(GetLocalVarInt("Flask1") == 4)
  {
      AddCombineCallback("", "flask01_cuprite_1", "chemical_container_half_1", "UseFlaskOnContainer", true);
      AddCombineCallback("", "flask01_aqua_regia_1", "chemical_container_half_1", "UseFlaskOnContainer", true);
      AddCombineCallback("", "flask01_calamine_1", "chemical_container_half_1", "UseFlaskOnContainer", true);
      AddCombineCallback("", "flask01_orpiment_1", "chemical_container_half_1", "UseFlaskOnContainer", true);
  }
}

void UseFlaskOnContainer(string &in asItemA, string &in asItemB)
{
RemoveItem(asItemA);
}

Creator of Pewdie's Revenge
07-29-2012, 09:21 AM
Find
neocrawler Offline
Member

Posts: 57
Threads: 19
Joined: Sep 2011
Reputation: 1
#7
RE: Why the hell does the combine not work?? :S

Okay thanks Smile.
08-07-2012, 12:30 PM
Website Find




Users browsing this thread: 1 Guest(s)