Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Edward Becket on Tue 22/07/2003 19:26:00

Title: Objs changing
Post by: Edward Becket on Tue 22/07/2003 19:26:00
There is a script that change the sprite of an object whitout using a loop of a view? Can i refer directly to the sprite number so that i can save space for views? ... it is so boring to make a loop only for a little changing of a little object...
Title: Re:Objs changing
Post by: SSH on Tue 22/07/2003 19:31:29
SetObjectGraphic (int object, int slot)

Sets the graphic for object number OBJECT to slot number SLOT. You can get the slot number from the Sprite Manager. If the object is currently animating (from an AnimateObject command) then the animation will be stopped.
Example:

SetObjectGraphic(2,100);

will change the object?s 2 image to the image stored in the sprite manager?s slot 100.
See Also: SetObjectFrame, SetObjectView

EDITed for friendlyness:

This answer is a manual extract, which can be difficult to find unless you already know its there by reading the whole thing through and memorizing it.
Title: Re:Objs changing
Post by: Scummbuddy on Tue 22/07/2003 19:38:09
Oh, be nice.
Nice icon though.  ;D
Title: Re:Objs changing
Post by: SSH on Tue 22/07/2003 19:42:18
I was just following TerranRich DryHump's READ ME FIRST, NO ME, ME, ME, THIS ONE, SERIOUSLY, BEFORE ANY OTHER, ABSOLUTLY FIRST thread  :P

Which is where the smilie(frownie?) came from, too
Title: Re:Objs changing
Post by: Edward Becket on Tue 22/07/2003 21:10:23
Thanks... but like i have already said i couldn't find that in the manual... it is a mine problem, bt i asked you to help me.
Title: Re:Objs changing
Post by: SSH on Wed 23/07/2003 11:45:12
Quote from: Edward Becket on Tue 22/07/2003 21:10:23
Thanks... but like i have already said i couldn't find that in the manual... it is a mine problem, bt i asked you to help me.

Ummm... I really don't understand this at all? Can you rephrase, please?
Title: Re:Objs changing
Post by: TerranRich on Wed 23/07/2003 12:55:47
English isn't his first language, so it says in his signature. But, as always, if it's in the manual, we'll tell you so. And SSH, I meant that one of US will respond will RTFM. I would've done that, but also give the impression that we're not mad or anything. Dammit, SSH, stop throwing your weight around! You're still a newbie too! :P
Title: Re:Objs changing
Post by: Edward Becket on Wed 23/07/2003 15:53:49
Ok... sorry. Evidently english is not my language ^^
However Dryhump have chosen the right topic: I'm still a newbie so please don't rebuke me  if i can't find something in the manual  :'(
Thanks to all, friends!
Title: Re:Objs changing
Post by: SSH on Wed 23/07/2003 16:42:40
Well, I wasn't being abusive or anything... just telling him that the info is in the manual! I didn't mean to scare/upset/offend/throw my weight around. Sorry dryhump, scummy and edward!  :-\

To be pedantic, Edward didn't actually say that he couldn't find it in the manual. And I did give the answer!  :-\

Oh well. In my first two years of marriage, all the arguments I had with my Spanish wife eventually turned out to be down to some language misunderstanding. Of course, now we have real arguments  ;)