Frictional Games Forum (read-only)
Safety Gates and Combination - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Safety Gates and Combination (/thread-13611.html)



Safety Gates and Combination - Alento - 02-26-2012

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 Tongue

Any suggestions? Smile

Thanks!


RE: Safety Gates and Combination - SilentStriker - 02-26-2012

I think you need a Inventory.hps file to be able to combine things Smile



RE: Safety Gates and Combination - Alento - 02-26-2012

(02-26-2012, 07:00 PM)SilentStriker Wrote: I think you need a Inventory.hps file to be able to combine things Smile
oh, okey, will try Smile

The Animation for the drill, how do I do that? Tongue


RE: Safety Gates and Combination - SilentStriker - 02-26-2012

That's another problem though it's cinematics and some skills. Check deterioration's scripts it has a drill animation Smile



RE: Safety Gates and Combination - Alento - 02-26-2012

(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 Smile
Okey , thank you! Smile

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 Smile
Okey , thank you! Smile

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" ?




RE: Safety Gates and Combination - SilentStriker - 02-26-2012

Did you use the Inventory.hps right then?

This is how the Inventory.hps should look like:

Code:
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



RE: Safety Gates and Combination - Alento - 02-26-2012

(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:

Code:
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 Tongue But anyways.. It didn't work :/

And also, what did you mean with deterioration's scripts? Smile
(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:

Code:
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"? Smile


RE: Safety Gates and Combination - SilentStriker - 02-27-2012

Deterioration is a CS that uses a drill animation, look at it's scripts and map and then you see how to do it Smile