what is the scripting to use an object on a char and then after that use another
how can i fit two functions into the "use inventory on" space
bool done;
function cChar_UseInv() {
InventoryItem*ai = player.ActiveInventory;
if (ai == iItem1) {
...
done = true;
}
else if (ai == iItem2) {
if (done) {
...
}
else player.Say("I can't do that yet.");
}
else player.Say("I don't want to give that to him.");
}
ok...so i did it...but now when i use the gold it doesn't dissappear from the inv and she repeats what she said for the suitcase...
heres my script...
function csarah_useinv(){{
if (player.ActiveInventory == isuitcase)
cFreddy.Walk(190, 161, eBlock, eWalkableAreas);
csarah.Say("thanks i guess...heres your money...");
cFreddy.LoseInventory(isuitcase);
cFreddy.AddInventory(igold);
}
if (player.ActiveInventory == igold){
csarah.Say("great...we'll eventually change the sign...in the meantime why dont you check out the park...try to find something to sell...");
cFreddy.LoseInventory(igold);
cFreddy.AddInventory(iparkkey);
}}
any idea??
You have misplaced a few brackets:
function csarah_useinv() {
if (player.ActiveInventory == isuitcase) {
cFreddy.Walk(190, 161, eBlock, eWalkableAreas);
csarah.Say("thanks i guess...heres your money...");
cFreddy.LoseInventory(isuitcase);
cFreddy.AddInventory(igold);
}
if (player.ActiveInventory == igold) {
csarah.Say("great...we'll eventually change the sign...in the meantime why dont you check out the park...try to find something to sell...");
cFreddy.LoseInventory(igold);
cFreddy.AddInventory(iparkkey);
}
}
thanx again:)