Frictional Games Forum (read-only)
Combining A Drill? - 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 A Drill? (/thread-26298.html)

Pages: 1 2 3 4


RE: Combining A Drill? - Amnesiaplayer - 09-25-2014

PHP Code:
void OnGameStart()
{
AddCombineCallback("DrillAB""DrillA""DrillB""CombineDrill"true);
AddCombineCallback("DrillBC""DrillB""DrillC""CombineDrill"true);
AddCombineCallback("DrillCA""DrillC""DrillA""CombineDrill"true); 
}
 
void CombineDrill(string &in asItemAstring &in asItemB)
{
        
RemoveItem(asItemA);
        
RemoveItem(asItemB);    
      
        
GiveSanityBoost();
 
        
PlayGuiSound("12_make_drill"1);
 
        
GiveItem("Drill""Puzzle""Drill""hand_drill.tga"1);


and if i add RemoveItem(asItemC);
It will not combine Sad (the drill)


RE: Combining A Drill? - FlawlessHappiness - 09-25-2014

That's because there is nothing in that script called asItemC.
You only have asItemA and asItemB as stated in the parameters: (string &in asItemA, string &in asItemB)

What you're gonne do is you're gonna use this instead:
PHP Code:
RemoveItem("DrillA");
RemoveItem("DrillB");
RemoveItem("DrillC"); 



RE: Combining A Drill? - Amnesiaplayer - 09-25-2014

I knooowww but what i said...
if i do THAT (copy paste) it still doesn't COMBINE...
so if i have THIS script

PHP Code:
void OnGameStart()
{
AddCombineCallback("DrillAB""DrillA""DrillB""CombineDrill"true);
AddCombineCallback("DrillBC""DrillB""DrillC""CombineDrill"true);
AddCombineCallback("DrillCA""DrillC""DrillA""CombineDrill"true); 
}
 
void CombineDrill(string &in asItemAstring &in asItemB)
{
        
RemoveItem("DrillA");
        
RemoveItem("DrillB");
        
RemoveItem("DrillC");  
      
        
GiveSanityBoost();
 
        
PlayGuiSound("12_make_drill"1);
 
        
GiveItem("Drill""Puzzle""Drill""hand_drill.tga"1);


it will NOT combine. (the parts) for the third time Tongue


RE: Combining A Drill? - FlawlessHappiness - 09-25-2014

As I'm looking at the script right now, everything should work fine.
Are the entities named correctly?

What happens when you try to combine them?


RE: Combining A Drill? - Amnesiaplayer - 09-25-2014

Yes they all are correct.
if i combine nothing happens. just message :

Can't combine items.


RE: Combining A Drill? - Mudbill - 09-25-2014

You said you could combine them fine before, but that you still had the drill parts in your inventory. How did it break? You haven't changed anything but those RemoveItem lines, right?


RE: Combining A Drill? - Amnesiaplayer - 09-25-2014

yes... i have Everything what you said.. and it DOESN'T combine Sad
but if i erase the Blabla C line.... it could work.... (tested) maybe i need somethingg ?? Sad


RE: Combining A Drill? - Mudbill - 09-25-2014

DOES it work if you remove that line then?

Cause if so, there's no reason for it not to after adding that line.


RE: Combining A Drill? - FlawlessHappiness - 09-25-2014

(09-25-2014, 06:15 PM)Amnesiaplayer Wrote: yes... i have Everything what you said.. and it DOESN'T combine Sad
but if i erase the Blabla C line.... it could work.... (tested) maybe i need somethingg ?? Sad

"Could" is not enough. You need to test it.


RE: Combining A Drill? - Amnesiaplayer - 09-25-2014

yes i forgot about it. i tested it like 5 times :S it's working if i erase the C line Sad
i really don't understand... the name MUST be good.. if the C name isn't good it wasn't possible to combine :S (it's good the names)