Hello
im having a bit of a problem coding something and would appreciate if anybody could help me out. I've only just started using AGS so i am a bit of a noob.
My problem is with combining inventory items. my aim is to allow my character to combine, an empty bottle, petrol, and an old cloth to make a petrol bomb. im not sure what im doing wrong but the code isnt working how id like it to and items are appearing and disapearing in the inventory when they are not wanted to. this is an example of the code i am using.
function ifullwine_UseInv()
{
if (cJon.ActiveInventory==iTorncurtain)
cJon.LoseInventory(iTorncurtain);
cJon.LoseInventory(ifullwine);
cJon.AddInventory(iwinebomb);
(cjon. is my character)
im having a bit of a problem coding something and would appreciate if anybody could help me out. I've only just started using AGS so i am a bit of a noob.
My problem is with combining inventory items. my aim is to allow my character to combine, an empty bottle, petrol, and an old cloth to make a petrol bomb. im not sure what im doing wrong but the code isnt working how id like it to and items are appearing and disapearing in the inventory when they are not wanted to. this is an example of the code i am using.
function ifullwine_UseInv()
{
if (cJon.ActiveInventory==iTorncurtain)
cJon.LoseInventory(iTorncurtain);
cJon.LoseInventory(ifullwine);
cJon.AddInventory(iwinebomb);
(cjon. is my character)