Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Aulis on Fri 23/05/2008 11:57:46

Title: Two Simple Beginners Questions
Post by: Aulis on Fri 23/05/2008 11:57:46
One, and this is really simple,

What is the small bit of code that lets a character change room?

I've got the "player. changeroom (...... , x , y)" bit.

It's just the bit where the ellipsis are that I'm stuck.

And Two, What is the script (from scratch, this time,) that removes an object from the inventory?

I've looked all through the manual, and can't find an answer explicit enough for my small brain.

Thank you,

Aulis
Title: Re: Two Simple Beginners Questions
Post by: JpSoft on Fri 23/05/2008 12:18:03
Number one...

cNameofCharacter.ChangeRoom(RoomNumber);

Numer two... i believe...

cCharacter.LostInventory(NumberofItem);

I hope it helps, but im sure this very well explained in the AGS help.

Jp
Title: Re: Two Simple Beginners Questions
Post by: Hainisoft on Fri 23/05/2008 12:23:02
Number two I don't know but...

Quote from: Aulis on Fri 23/05/2008 11:57:46
And Two, What is the script (from scratch, this time,) that removes an object from the inventory?

"from inventory"
not a normal object.

Edit:
I see it is corrected.
Title: Re: Two Simple Beginners Questions
Post by: .M.M. on Fri 23/05/2008 12:58:57
Quote from: JpSoft on Fri 23/05/2008 12:18:03
cCharacter.LostInventory(NumberofItem);
No, it is cCharacter.LoseInventory(InventoryItem *item);
cCharacter= script name of character who will lose an item (you can also use player).
InventoryItem *item= script name of your item, eg. iKey.
So it could be something like that: player.LoseInventory(iKey);
And, basically, look into the manual- there is one part  for begginers.
Title: Re: Two Simple Beginners Questions
Post by: Aulis on Fri 23/05/2008 13:23:33
Thanks for your help.