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
Combining Items Problem
D3AD UPR1S1NG Offline
Member

Posts: 64
Threads: 21
Joined: Apr 2011
Reputation: 0
#1
Combining Items Problem

I've been trying to combine these items to create the drill except I keep getting an error saying Combination Does Not Work anyone know what's wrong with this script?

void OnStart()
{
AddCombineCallback("", "hand_drill_part01_1", "hand_drill_part03_1", "Combine1", false);
}

void Combine1(string &in asItemA, string &in asItemB)
{
PlayGuiSound("12_make_drill.ogg", 100.0);
GivePlayerSanity(50.0);
RemoveItem(asItemA);
RemoveItem(asItemB);
GiveItem("", "hand_drill", "FinishedDrill", "hand_drill.tga", 0);
}

and yes it is in Inventory.hps Smile anyone got any ideas?

The Harrowing Tale Of Redendrew Mansion
05-30-2011, 05:00 PM
Find
triadtimes Offline
Senior Member

Posts: 508
Threads: 16
Joined: Jan 2011
Reputation: 21
#2
RE: Combining Items Problem

The GiveItem script works like this:
GiveItem(string& asName, string& asType, string& asSubTypeName, string& asImageName, float afAmount);

So first make it look something like this:
GiveItem("hand_drill", "Puzzle", "drill", "hand_drill.tga", 0);
"hand_drill" being the name in the level editor
"Puzzle" being the type of item (most are puzzle check in the model editor)
"drill" being the name for the .lang file

Also have OnGameStart() not OnStart()

I hope that helps.

05-30-2011, 05:57 PM
Find
D3AD UPR1S1NG Offline
Member

Posts: 64
Threads: 21
Joined: Apr 2011
Reputation: 0
#3
RE: Combining Items Problem

(05-30-2011, 05:57 PM)triadtimes Wrote: The GiveItem script works like this:
GiveItem(string& asName, string& asType, string& asSubTypeName, string& asImageName, float afAmount);

So first make it look something like this:
GiveItem("hand_drill", "Puzzle", "drill", "hand_drill.tga", 0);
"hand_drill" being the name in the level editor
"Puzzle" being the type of item (most are puzzle check in the model editor)
"drill" being the name for the .lang file

Also have OnGameStart() not OnStart()

I hope that helps.

Sorry it hasn't worked Sad can I just ask do you need to have the actual finished drill in the map?

The Harrowing Tale Of Redendrew Mansion
05-30-2011, 07:10 PM
Find
triadtimes Offline
Senior Member

Posts: 508
Threads: 16
Joined: Jan 2011
Reputation: 21
#4
RE: Combining Items Problem

No, you shouldn't need that, are you sure you're combining exactly those two pieces with the correct name; I would double check that the names in the editor match those ones. Also in the actual game there is a combine callback for every combination possible, that may be your problem (though I doubt that if those are the only two pieces you're using).

05-30-2011, 07:19 PM
Find
D3AD UPR1S1NG Offline
Member

Posts: 64
Threads: 21
Joined: Apr 2011
Reputation: 0
#5
RE: Combining Items Problem

(05-30-2011, 07:19 PM)triadtimes Wrote: No, you shouldn't need that, are you sure you're combining exactly those two pieces with the correct name; I would double check that the names in the editor match those ones. Also in the actual game there is a combine callback for every combination possible, that may be your problem (though I doubt that if those are the only two pieces you're using).

Alright I'll check thanks Smile


The Harrowing Tale Of Redendrew Mansion
05-30-2011, 07:20 PM
Find




Users browsing this thread: 2 Guest(s)