Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Rik_Vargard on Sun 28/03/2004 20:33:25

Title: Change object picture?
Post by: Rik_Vargard on Sun 28/03/2004 20:33:25
I want object 1 to change it's picture, but only when I use object 7 from my inventory on it. So in "Interact with object", I run this script, but it won't work!  :(


// script for object1: Interact object

if (character[GetPlayerCharacter()].activeinv ==7)
{
   SetObjectGraphic(1,34);}


Any comments? ???

Thx!!
Title: Re:Change object picture?
Post by: Ishmael on Sun 28/03/2004 20:38:01
You need to select the "Usen inventory on object" from the interaction editor, there put "Run script" and paste that code in it.
Title: Re:Change object picture?
Post by: Rik_Vargard on Sun 28/03/2004 20:59:06
THX, TK!  ;D

That was it, I was in the wrong place :) :) :)