Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Tenacious Stu on Wed 05/05/2010 05:29:49

Title: Setting a view to an Object
Post by: Tenacious Stu on Wed 05/05/2010 05:29:49
Hi guys, I tried to search for this one but no luck... ???

I want to set a view to an object when the room loads as I want to animate the object later in the game when the player uses an inventory item on it.

so I have

function room_load()
{
oObject.SetView (4,2,0);  -- As I want to set it to VIEW 4, loop 2, frame 0
}

When I load the room the object just stays as the blue cup default, why is it not changing to the VIEW?

It's probably something silly I'm sure, but thanks in advance for any replies
Title: Re: Setting a view to an Object
Post by: Gilbert on Wed 05/05/2010 06:09:50
Hmmm. Did you type in that room_load() function yourself, or have you set it via the "events" panel of the room? You should link the function correctly to the event in that panel.
Title: Re: Setting a view to an Object
Post by: Tenacious Stu on Wed 05/05/2010 21:01:20
Ahhhh, yes that seems to have cleared it up.

Yes I did type it myself, I didn't realize that this would have an undesired effect, I guess I know for next time  ;)

Thanks Very Much Gilbet, Much apreciated, I knew it would be something daft  :P