neocrawler
Member
Posts: 57
Threads: 19
Joined: Sep 2011
Reputation:
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 |
|
Your Computer
SCAN ME!
Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation:
235
|
RE: Why the hell does the combine not work?? :S
Probably because GetLocalVarInt("Flask1") != 4. Can't figure it out with so little information.
|
|
07-19-2012, 09:34 PM |
|
neocrawler
Member
Posts: 57
Threads: 19
Joined: Sep 2011
Reputation:
1
|
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 |
|
Your Computer
SCAN ME!
Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation:
235
|
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"?
|
|
07-19-2012, 10:33 PM |
|
neocrawler
Member
Posts: 57
Threads: 19
Joined: Sep 2011
Reputation:
1
|
RE: Why the hell does the combine not work?? :S
I didn't try before I picked up all four of them
|
|
07-19-2012, 10:54 PM |
|
ksnider
Junior Member
Posts: 9
Threads: 0
Joined: Jul 2012
Reputation:
0
|
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);
}
|
|
07-29-2012, 09:21 AM |
|
neocrawler
Member
Posts: 57
Threads: 19
Joined: Sep 2011
Reputation:
1
|
RE: Why the hell does the combine not work?? :S
Okay thanks .
|
|
08-07-2012, 12:30 PM |
|
|