Two Simple Beginners Questions

Started by Aulis, Fri 23/05/2008 11:57:46

Previous topic - Next topic

Aulis

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
Think like a child

JpSoft

#1
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

Hainisoft

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.

.M.M.

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:
Code: ags
 player.LoseInventory(iKey); 

And, basically, look into the manual- there is one part  for begginers.

Aulis

Think like a child

SMF spam blocked by CleanTalk