Frictional Games Forum (read-only)

Full Version: Combining A Drill?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
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)
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"); 
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
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?
Yes they all are correct.
if i combine nothing happens. just message :

Can't combine items.
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?
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
DOES it work if you remove that line then?

Cause if so, there's no reason for it not to after adding that line.
(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.
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)
Pages: 1 2 3 4