Alento
Member
Posts: 64
Threads: 11
Joined: Jan 2012
Reputation:
0
|
Safety Gates and Combination
Hey everyone!
I'm doing the second part of my CS, and I've decide to make a drill (that you combine), Question is, how do i make em' "combine-able"?
And my second question is. I have a safety valve, wich you could open with a wheel. But now I want it to open if a "puzzle" is solved.
the "puzzle" is that you set an "cogwheel station" (the one that slows the waterwheel in original).
But how do I get the safety valve to go up when the "puzzle" is solved? I mean, i don't even know how to make the valve go up
Any suggestions?
Thanks!
(This post was last modified: 02-26-2012, 06:47 PM by Alento.)
|
|
02-26-2012, 06:32 PM |
|
SilentStriker
Posting Freak
Posts: 950
Threads: 26
Joined: Jul 2011
Reputation:
43
|
RE: Safety Gates and Combination
I think you need a Inventory.hps file to be able to combine things
|
|
02-26-2012, 07:00 PM |
|
Alento
Member
Posts: 64
Threads: 11
Joined: Jan 2012
Reputation:
0
|
RE: Safety Gates and Combination
(02-26-2012, 07:00 PM)SilentStriker Wrote: I think you need a Inventory.hps file to be able to combine things oh, okey, will try
The Animation for the drill, how do I do that?
|
|
02-26-2012, 07:08 PM |
|
SilentStriker
Posting Freak
Posts: 950
Threads: 26
Joined: Jul 2011
Reputation:
43
|
RE: Safety Gates and Combination
That's another problem though it's cinematics and some skills. Check deterioration's scripts it has a drill animation
|
|
02-26-2012, 07:14 PM |
|
Alento
Member
Posts: 64
Threads: 11
Joined: Jan 2012
Reputation:
0
|
RE: Safety Gates and Combination
(02-26-2012, 07:14 PM)SilentStriker Wrote: That's another problem though it's cinematics and some skills. Check deterioration's scripts it has a drill animation Okey , thank you!
but, I tried the Combination with and Inventory.hps, but it sin't work :/
Script:
void OnStart()
{
AddCombineCallback("drill1", "drill2", "drill3", "HandDrill", true);
}
void HandDrill(string &in asItemA, string &in asItemB)
{
RemoveItem("drill1");
RemoveItem("drill2");
RemoveItem("drill3");
GiveItem("HandDrill", "hand_drill.ent", "HandDrill", "", 1);
}
(02-26-2012, 07:25 PM)Alento Wrote: (02-26-2012, 07:14 PM)SilentStriker Wrote: That's another problem though it's cinematics and some skills. Check deterioration's scripts it has a drill animation Okey , thank you!
but, I tried the Combination with and Inventory.hps, but it sin't work :/
Script:
void OnStart()
{
AddCombineCallback("drill1", "drill2", "drill3", "HandDrill", true);
}
void HandDrill(string &in asItemA, string &in asItemB)
{
RemoveItem("drill1");
RemoveItem("drill2");
RemoveItem("drill3");
GiveItem("HandDrill", "hand_drill.ent", "HandDrill", "", 1);
} hm.. probably add an "asItemC" ?
(This post was last modified: 02-26-2012, 07:25 PM by Alento.)
|
|
02-26-2012, 07:25 PM |
|
SilentStriker
Posting Freak
Posts: 950
Threads: 26
Joined: Jul 2011
Reputation:
43
|
RE: Safety Gates and Combination
Did you use the Inventory.hps right then?
This is how the Inventory.hps should look like:
void OnGameStart()
{
AddCombineCallback("", "drill_bit", "drill_handle", "CombineDrill", false);
AddCombineCallback("", "drill_bit", "drill_part", "CombineDrill", false);
AddCombineCallback("", "drill_part", "drill_handle", "CombineDrill", false);
}
void CombineDrill(string &in asItemA, string &in asItemB)
{
if(GetLocalVarInt("DrillParts") == 3)
{
PlayGuiSound("12_make_drill", 1.0f);
RemoveItem("drill_bit");
RemoveItem("drill_part");
RemoveItem("drill_handle");
GiveItem("hand_drill_1", "hand_drill", "handdrill", "hand_drill.tga", 0);
SetInventoryMessage("Inventory", "MadeDrill", -1);
}
else
{
SetInventoryMessage("Inventory", "CombineDrillError", -1);
return;
}
}
And remember to put it inside your map folder
(This post was last modified: 02-26-2012, 07:46 PM by SilentStriker.)
|
|
02-26-2012, 07:29 PM |
|
Alento
Member
Posts: 64
Threads: 11
Joined: Jan 2012
Reputation:
0
|
RE: Safety Gates and Combination
(02-26-2012, 07:29 PM)SilentStriker Wrote: Did you use the Inventory.hps right then?
This is how the Inventory.hps should look like:
void OnGameStart()
{
AddCombineCallback("", "drill_bit", "drill_handle", "CombineDrill", false);
AddCombineCallback("", "drill_bit", "drill_part", "CombineDrill", false);
AddCombineCallback("", "drill_part", "drill_handle", "CombineDrill", false);
}
void CombineDrill(string &in asItemA, string &in asItemB)
{
if(GetLocalVarInt("DrillParts") == 3)
{
PlayGuiSound("12_make_drill", 1.0f);
RemoveItem("drill_bit");
RemoveItem("drill_part");
RemoveItem("drill_handle");
GiveItem("hand_drill_1", "hand_drill", "handdrill", "hand_drill.tga", 0);
SetInventoryMessage("Inventory", "MadeDrill", -1);
}
else
{
SetInventoryMessage("Inventory", "CombineDrillError", -1);
return;
}
}
And remember to put it inside your map folder hm.. weird.. I did exactly as you did, and still it didn't work... I wish the TDD inventory would help, but it so much that I don't understand xD SO MESSY But anyways.. It didn't work :/
And also, what did you mean with deterioration's scripts?
(02-26-2012, 07:29 PM)SilentStriker Wrote: Did you use the Inventory.hps right then?
This is how the Inventory.hps should look like:
void OnGameStart()
{
AddCombineCallback("", "drill_bit", "drill_handle", "CombineDrill", false);
AddCombineCallback("", "drill_bit", "drill_part", "CombineDrill", false);
AddCombineCallback("", "drill_part", "drill_handle", "CombineDrill", false);
}
void CombineDrill(string &in asItemA, string &in asItemB)
{
if(GetLocalVarInt("DrillParts") == 3)
{
PlayGuiSound("12_make_drill", 1.0f);
RemoveItem("drill_bit");
RemoveItem("drill_part");
RemoveItem("drill_handle");
GiveItem("hand_drill_1", "hand_drill", "handdrill", "hand_drill.tga", 0);
SetInventoryMessage("Inventory", "MadeDrill", -1);
}
else
{
SetInventoryMessage("Inventory", "CombineDrillError", -1);
return;
}
}
And remember to put it inside your map folder maybe I should just have something else to open the freaking door... ^^
Do you know anything about the "safety door"?
(This post was last modified: 02-26-2012, 08:33 PM by Alento.)
|
|
02-26-2012, 08:00 PM |
|
SilentStriker
Posting Freak
Posts: 950
Threads: 26
Joined: Jul 2011
Reputation:
43
|
RE: Safety Gates and Combination
Deterioration is a CS that uses a drill animation, look at it's scripts and map and then you see how to do it
|
|
02-27-2012, 12:01 AM |
|
|