Frictional Games Forum (read-only)

Full Version: Combine drill in a script!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
HI GUYS, CAN YOU HELP ME HOW TO SCRIPT COMBINE HAND DRILL..
BECAUSE I HAVE MY FIRST CS FROM MODDB...

THANK YOU TO READ AND HELP Wink
Make a .txt file.
Change it's extension to .hps.
Rename it so that it will look like "global.hps".
Open it with Notepad.
Copy-paste the following code to your global.hps
Code:
void OnGameStart()
{
AddCombineCallback("HandDrill", "Nameofthefirstitem", "Nameoftheseconditem", "CombineHandDrill", true);
}

void CombineHandDrill(string &in asItemA, string &in asItemB)
{
PlayGuiSound("12_make_drill", 1.0f);
RemoveItem(asItemA); RemoveItem(asItemB);
GiveItem("HandDrill", "Puzzle", "hand_drill", "hand_drill.tga", 0);
}
Change
"Nameofthefirstitem" to the First Item you wanna combine.
AND
"Nameoftheseconditem" to the Second Item you wanna combine.
The names must be the same as their name in the Level Editor. And always use quotation marks ("") around names.
(04-05-2013, 09:49 AM)JustAnotherPlayer Wrote: [ -> ]Make a .txt file.
Change it's extension to .hps.
Rename it so that it will look like "global.hps".
Open it with Notepad.
Copy-paste the following code to your global.hps
Code:
void OnGameStart()
{
AddCombineCallback("HandDrill", "Nameofthefirstitem", "Nameoftheseconditem", "CombineHandDrill", true);
}

void CombineHandDrill(string &in asItemA, string &in asItemB)
{
PlayGuiSound("12_make_drill", 1.0f);
RemoveItem(asItemA); RemoveItem(asItemB);
GiveItem("HandDrill", "Puzzle", "hand_drill", "hand_drill.tga", 0);
}
Change
"Nameofthefirstitem" to the First Item you wanna combine.
AND
"Nameoftheseconditem" to the Second Item you wanna combine.
The names must be the same as their name in the Level Editor. And always use quotation marks ("") around names.

how about 3 parts like from the storage in ATDD?
(04-05-2013, 10:55 AM)TimeSpectre Wrote: [ -> ]
(04-05-2013, 09:49 AM)JustAnotherPlayer Wrote: [ -> ]Make a .txt file.
Change it's extension to .hps.
Rename it so that it will look like "global.hps".
Open it with Notepad.
Copy-paste the following code to your global.hps
Code:
void OnGameStart()
{
AddCombineCallback("HandDrill", "Nameofthefirstitem", "Nameoftheseconditem", "CombineHandDrill", true);
}

void CombineHandDrill(string &in asItemA, string &in asItemB)
{
PlayGuiSound("12_make_drill", 1.0f);
RemoveItem(asItemA); RemoveItem(asItemB);
GiveItem("HandDrill", "Puzzle", "hand_drill", "hand_drill.tga", 0);
}
Change
"Nameofthefirstitem" to the First Item you wanna combine.
AND
"Nameoftheseconditem" to the Second Item you wanna combine.
The names must be the same as their name in the Level Editor. And always use quotation marks ("") around names.

how about 3 parts like from the storage in ATDD?
Dunno. The Script Functions page only gave me two.
Does it require any script at all? I heard that combinantions working in Amnesia: The Dark Descent, work in Custom Stories without additional scripting. Everything has been already set in "Inventory.hps" in main Amnesia folder with maps. I think only combinations that have never existed in The Dark Descent require scripting. And this might be quite troublesome, as with Justine patch it seems not to work properly.
......

The file name was supposed to be "Inventory.hps". Sorry.