Inventory interaction

Started by Nintengame, Mon 29/05/2006 22:55:35

Previous topic - Next topic

Nintengame

I want to set up my inventory so that when the player clicks on, say, a box, it will open and give him another item

Khris

#1
Go to inventory items, select the box, click "Interactions", double click on "Interact with inventory item", add a RunScript-Interaction, then enter this
Code: ags
Ã,  if (GetGlobalInt(100)==1) player.Say("It's empty.");
Ã,  else {
Ã,  Ã,  SetGlobalInt(100, 1);
Ã,  Ã,  player.AddInventory(iContents);
Ã,  Ã,  player.Say("Hey, there's a whatever in there.");
Ã,  }


This is even too basic to be a beginner's question. You really need to read the manual and do the included tutorial.
Maybe you should've figured out the very basics of AGS first, before opening a Game in production-thread...

Nintengame

look, my manual doesn't work, ok?

Gilbert

But did you try fixing it or reading the online manual as suggested in this thread?


SMF spam blocked by CleanTalk