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
[SOLVED]Use combined object on door? Mr. Noob wants some help
LankySpankey103 Offline
Junior Member

Posts: 10
Threads: 3
Joined: Feb 2013
Reputation: 0
#1
[SOLVED]Use combined object on door? Mr. Noob wants some help

Hey guys, I am having a little problem. I finally managed to combine my hammer and chipper into an item in my inventory, but when i then want it to i.e. unlock a door, it says "Cannot use the item this way". I would assume that it is the same code as using a key on a door ? Anyways, here is my code from both my inventory.hps and mapname.hps:

void OnGameStart()
{
    AddCombineCallback("hammer_and_chipper", "stone_hammer_1", "stone_chipper_1", "HammerChipper", false);
}

void HammerChipper(string &in item_1, string &in item_2)
{
    RemoveItem(item_1);
    RemoveItem(item_2);
    GiveItem("hammer_and_chipper", "Puzzle", "HammerAndChipper", "hammerandchipper.tga", 1);
}

void OnStart()
{
    AddUseItemCallback("hammer_and_chipper", "hammer_and_chipper", "cellar_wood01_1", "BreakDoor1", false);
    
}

void BreakDoor1(string &in asItem, string &in asEntity)
{
    SetSwingDoorLocked("cellar_wood01_1", false, true);
}

Thanks in advance :-)
(This post was last modified: 03-17-2013, 03:52 PM by LankySpankey103.)
03-17-2013, 03:37 PM
Website Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#2
RE: Use combined object on door? Mr. Noob wants some help

In your AddUseItemCallback, ignore the internal name.

"Veni, vidi, vici."
"I came, I saw, I conquered."
03-17-2013, 03:41 PM
Find
LankySpankey103 Offline
Junior Member

Posts: 10
Threads: 3
Joined: Feb 2013
Reputation: 0
#3
RE: Use combined object on door? Mr. Noob wants some help

Thanks, but still doesn't work though Undecided

EDIT: Well dag nammit. Apparently i had to restart the level editor, notepad++ and amnesia for it to work -.-'

But thanks for the help!
(This post was last modified: 03-17-2013, 03:49 PM by LankySpankey103.)
03-17-2013, 03:44 PM
Website Find




Users browsing this thread: 1 Guest(s)