I'm trying to make it so that if I use a stick on the river I have. It will change the stick in my inventory into a stick with a fish on it. But with it the way it is now you can use any item on the river and it still does it.
function hHotspot2_UseInv()
{
Jason.Walk(92, 112);
Jason.Say("&22 Fishy fishy fishy!");
Display("You spear the fish in the river.");
player.LoseInventory(istick);
player.AddInventory(Fishstick);
}
Please help me.
you have to write:
function hHotspot2_UseInv()
{
if(player.ActiveInventory==istick){
Jason.Walk(92, 112);
Jason.Say("&22 Fishy fishy fishy!");
Display("You spear the fish in the river.");
player.LoseInventory(istick);
player.AddInventory(Fishstick);
}
else Display("You can't throw that into the river.");
}
That should work.
if (player.ActiveInventory == iStick) [
//do stuff
}
[Edit]:NsMn beat me by mere seconds.
~Trent
Quote from: NsMn on Wed 13/05/2009 17:48:10
you have to write:
function hHotspot2_UseInv()
{
if(player.ActiveInventory==istick){
Jason.Walk(92, 112);
Jason.Say("&22 Fishy fishy fishy!");
Display("You spear the fish in the river.");
player.LoseInventory(istick);
player.AddInventory(Fishstick);
}
else Display("You can't throw that into the river.");
}
That should work.
Thankyou a lot! It helped me heaps :) *cookie*
The number of threads asking this exact same question must be above 50 by now, I'm sure.
I'd like to join with Khris's suggestion in the last thread like this: Add to the tutorial!
Even densming only recently touched on it IIRC, but that's 30-something vids in.
~Trent