Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Icey on Sat 07/05/2011 21:28:24

Title: Set frame sprites from with in the game?
Post by: Icey on Sat 07/05/2011 21:28:24
Is it possible to change the sprites that are in a characters view from with in the game?
Title: Re: Set frame sprites from with in the game?
Post by: monkey0506 on Sat 07/05/2011 21:43:11
Yup. Look up ViewFrame.Graphic in the manual.

Use Game.GetViewFrame, Character.View, Character.Loop, and Character.Frame to get the ViewFrame pointer.

If you set the ViewFrame.Graphic to the value of a DynamicSprite's graphic then it will only work if the DynamicSprite pointer is global.

Should be enough to get you started at least. Let us know when you have some code, working or not, and we'll help you from there as needed.
Title: Re: Set frame sprites from with in the game?
Post by: Icey on Sat 07/05/2011 23:45:29
Thanks monkey. I will check this out.