Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Candle on Sun 23/04/2006 20:08:13

Title: Used item only if in room 6 (SOLVED)
Post by: Candle on Sun 23/04/2006 20:08:13
I have a fishing pole and when it is used on the player[melt] I want to have him change views and do a small character animation of him using the pole.
But only if he is in the room with the small pond(room 6).
What would be the best way to do it?
Title: Re: Used item only if in room 6
Post by: Ashen on Sun 23/04/2006 22:37:55
You mean an inventory item you'd use on the character? Just do the normal Inventory Interaction, but add a check of the player.Room property (http://www.adventuregamestudio.co.uk/manual/Character.Room.htm), e.g.:

if (player.ActiveInventory == iPole) {
  if (player.Room == 6) {
    // Change View
    // Do Animation
  }
  else player.Say ("This isn't the place for that.");
}


On another note - this is about the third question on the run you've asked that's quite easily answered by just reading the manual. Please, think about it a little harder before you post next time.
Title: Re: Used item only if in room 6
Post by: Candle on Sun 23/04/2006 22:40:34
Didn't mean take up your time sorry.