Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Level Editor Help Combine drill in a script!
TimeSpectre Offline
Junior Member

Posts: 2
Threads: 1
Joined: Apr 2013
Reputation: 0
#1
Combine drill in a script!

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
04-05-2013, 09:27 AM
Find Reply
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#2
RE: Combine drill in a script!

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

"Veni, vidi, vici."
"I came, I saw, I conquered."
(This post was last modified: 04-05-2013, 09:59 AM by PutraenusAlivius.)
04-05-2013, 09:49 AM
Find Reply
TimeSpectre Offline
Junior Member

Posts: 2
Threads: 1
Joined: Apr 2013
Reputation: 0
#3
RE: Combine drill in a script!

(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
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
Find Reply
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#4
RE: Combine drill in a script!

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

"Veni, vidi, vici."
"I came, I saw, I conquered."
04-05-2013, 11:07 AM
Find Reply
Yare Offline
Junior Member

Posts: 22
Threads: 2
Joined: Mar 2013
Reputation: 0
#5
RE: Combine drill in a script!

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.
(This post was last modified: 04-05-2013, 12:17 PM by Yare.)
04-05-2013, 12:16 PM
Find Reply
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#6
RE: Combine drill in a script!

......

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

"Veni, vidi, vici."
"I came, I saw, I conquered."
04-05-2013, 03:40 PM
Find Reply




Users browsing this thread: 1 Guest(s)