![]() |
Combining script isn´t working. Please help - 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: Combining script isn´t working. Please help (/thread-17623.html) |
Combining script isn´t working. Please help - Timotej - 08-09-2012 Hey everyone I am trying to make a script of combining an obsidian("rock") and a guiding rod ("stick") to make a hammer. Unfortunately, the script isn´t working. Can you tell me where´s the problem? My inventory.hps looks like this. void OnStart() { AddCombineCallback("", "stick", "rock", "CombineFunc", true); } void CombineFunc(string &in asItemA, string &in asItemB) { PlayGuiSound("15_make_hammer", 1.0f); RemoveItem("stick"); RemoveItem("rock"); GiveItem("stone_hammer", "Puzzle", "stone_hammer", "stone_hammer.tga", 0); } RE: Combining script isn´t working. Please help - Melvin - 08-09-2012 void OnStart() { AddCombineCallback("", "stick", "rock", "CombineFunc", true); } void CombineFunc(string &in asItemA, string &in asItemB) { PlayGuiSound("15_make_hammer", 1.0f); RemoveItem("stick"); RemoveItem("rock"); GiveItem("stone_hammer", "Puzzle", "stone_hammer", "stone_hammer.tga", 0); } void OnLeave() { } This should work, if not, try looking into your leveleditor for typos or capital letters. what exactly isn't working? Can you be a little more specific? RE: Combining script isn´t working. Please help - Timotej - 08-10-2012 (08-09-2012, 10:47 PM)SmokeMelvin Wrote: void OnStart()I tried this and it is still saying "Combination does not work" RE: Combining script isn´t working. Please help - Fearlessagent - 08-13-2012 (08-10-2012, 10:46 AM)Timotej Wrote:OnStart() should be OnGameStart() in inventory.hps(08-09-2012, 10:47 PM)SmokeMelvin Wrote: void OnStart()I tried this and it is still saying "Combination does not work" RE: Combining script isn´t working. Please help - Timotej - 08-14-2012 (08-13-2012, 09:14 PM)Fearlessagent Wrote:Still not working.(08-10-2012, 10:46 AM)Timotej Wrote:OnStart() should be OnGameStart() in inventory.hps(08-09-2012, 10:47 PM)SmokeMelvin Wrote: void OnStart()I tried this and it is still saying "Combination does not work" RE: Combining script isn´t working. Please help - Your Computer - 08-14-2012 Where'd you put your inventory.hps file? |