Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support


Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Safety Gates and Combination
Author Message
Alento Offline
Member

Posts: 64
Joined: Jan 2012
Reputation: 0
Post: #1
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 Tongue

Any suggestions? Smile

Thanks!

---------Want help with YOUR Custom Story? ---------
http://www.frictionalgames.com/forum/user-19049.html
(This post was last modified: 02-26-2012 06:47 PM by Alento.)
02-26-2012 06:32 PM
Find all posts by this user Quote this message in a reply
SilentStriker Offline
Posting Freak

Posts: 950
Joined: Jul 2011
Reputation: 43
Post: #2
RE: Safety Gates and Combination

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

02-26-2012 07:00 PM
Find all posts by this user Quote this message in a reply
Alento Offline
Member

Posts: 64
Joined: Jan 2012
Reputation: 0
Post: #3
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 Smile
oh, okey, will try Smile

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

---------Want help with YOUR Custom Story? ---------
http://www.frictionalgames.com/forum/user-19049.html
02-26-2012 07:08 PM
Find all posts by this user Quote this message in a reply
SilentStriker Offline
Posting Freak

Posts: 950
Joined: Jul 2011
Reputation: 43
Post: #4
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 Smile

02-26-2012 07:14 PM
Find all posts by this user Quote this message in a reply
Alento Offline
Member

Posts: 64
Joined: Jan 2012
Reputation: 0
Post: #5
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 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" ?

---------Want help with YOUR Custom Story? ---------
http://www.frictionalgames.com/forum/user-19049.html
(This post was last modified: 02-26-2012 07:25 PM by Alento.)
02-26-2012 07:25 PM
Find all posts by this user Quote this message in a reply
SilentStriker Offline
Posting Freak

Posts: 950
Joined: Jul 2011
Reputation: 43
Post: #6
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
Find all posts by this user Quote this message in a reply
Alento Offline
Member

Posts: 64
Joined: Jan 2012
Reputation: 0
Post: #7
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 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:

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

---------Want help with YOUR Custom Story? ---------
http://www.frictionalgames.com/forum/user-19049.html
(This post was last modified: 02-26-2012 08:33 PM by Alento.)
02-26-2012 08:00 PM
Find all posts by this user Quote this message in a reply
SilentStriker Offline
Posting Freak

Posts: 950
Joined: Jul 2011
Reputation: 43
Post: #8
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 Smile

02-27-2012 12:01 AM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)