NATURE OF PROBLEM:
BASICALLY I AM MAKING A PRACTICE GAME IN WHICH THE PLAYER MUST PICK UP A BAG OF CEMENT, AND POOR IT INTO A POND.
AFTER WARDS i AM STUCK WITH THE BAG OF CEMENT IN MY INVENTORY.
HOW DO I MAKE ITEMS (ONE TIME USE ONLY) AFTER WHICH THEY DISAPEAR
AS I WILL NEED THIS FUNCTION
IF ANY ONE CAN HELP I WOULD REALLY BE GRATEFUL.
Beore anyone else tells you, lose the all capital letters thing you're doing.
Have you read the manual?
I'll give you a push in the right direction:
In the manual, search for, LoseInventory...
--Snake
Failing that, I should point out that the AGS scripting language is case-sensitive, so you're probably going to need to get a working keyboard before you continue.
Quote from: Snake on Mon 22/09/2008 17:49:21
Beore anyone else tells you, lose the all capital letters thing you're doing.
Have you read the manual?
I'll give you a push in the right direction:
In the manual, search for, LoseInventory...
--Snake
Thank you
Quote from: Makeout Patrol on Mon 22/09/2008 19:32:32
Failing that, I should point out that the AGS scripting language is case-sensitive, so you're probably going to need to get a working keyboard before you continue.
Had virus , been deleting parts of windows causing many problems.
Thanks for your help.
Quote from: Snake on Mon 22/09/2008 17:49:21
Beore anyone else tells you, lose the all capital letters thing you're doing.
Have you read the manual?
I'll give you a push in the right direction:
In the manual, search for, LoseInventory...
--Snake
ok been there and read it , I managed to insert
character[EGO].LoseInventory(iconcrete); and made sure to go to inventory and add a script name for this item first!
I put the line after a :if inventory item was used comand within character interactions
and the game still ran but nothing happened.
I read that its possible to just set AGS to do what I want automatically from the general settings but when I checked mine I could not find this option?
I was planning to use little or no scripting as I am very new to this.
I simply want the item to get (used up) when the player used it on the correct hotspot. do I need an earlier version of ags perhaps?
really need a hand with this? :-[
I am using AGS 2.7
You can do it without scripting, 2.7 still contains the interaction editor.
Since the player is supposed to use the cement on a pond, you'll need to add the action(s) to the POND'S "use inventory on hotspot" event, not the player's.
First add a "Conditional - if inventory item was used" and set the number to the cement's index number.
Then double-click the "Do Nothing" child action and change it to "Player - remove an item from the inventory" (again set the number to the cement's).
You might want to right click that child action and "Add action after this..." to add a Display command to tell the player what's happened.
And please, do the tutorial in the manual.
Btw, you'll only need the Script O-name if you use code.
Quote from: KhrisMUC on Tue 23/09/2008 00:41:48
You can do it without scripting, 2.7 still contains the interaction editor.
Since the player is supposed to use the cement on a pond, you'll need to add the action(s) to the POND'S "use inventory on hotspot" event, not the player's.
First add a "Conditional - if inventory item was used" and set the number to the cement's index number.
Then double-click the "Do Nothing" child action and change it to "Player - remove an item from the inventory" (again set the number to the cement's).
You might want to right click that child action and "Add action after this..." to add a Display command to tell the player what's happened.
And please, do the tutorial in the manual.
Btw, you'll only need the Script O-name if you use code.
I will follow this very carfully, thanks
I just did not know where to use that player remove inventory command thanks a million
oh it worked by the way cheers