Frictional Games Forum (read-only)
[LVL ED] Combine drill in a script! - 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: [LVL ED] Combine drill in a script! (/thread-21051.html)



Combine drill in a script! - TimeSpectre - 04-05-2013

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


RE: Combine drill in a script! - PutraenusAlivius - 04-05-2013

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.


RE: Combine drill in a script! - TimeSpectre - 04-05-2013

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


RE: Combine drill in a script! - PutraenusAlivius - 04-05-2013

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


RE: Combine drill in a script! - Yare - 04-05-2013

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.


RE: Combine drill in a script! - PutraenusAlivius - 04-05-2013

......

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