Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: myname on Sat 06/08/2011 15:08:58

Title: changing walk cycle?
Post by: myname on Sat 06/08/2011 15:08:58
Sorry but I could not find this in the game contents or on the forums...
I was wondering what would be the easiest way to change my players walk cycle in mid game, for example: If the player for some reason loses control of his legs and has to army crawl until he finds a certain object in the room and is able to walk again.  Thanks if anyone can help.
Title: Re: changing walk cycle?
Post by: RickJ on Sat 06/08/2011 15:38:00
You can set/change a character or object's view.  So you would just create a alternate view for the character an switch to it when needed. 

I don't remember the if it's a function call or a property but it should be in the  help file under character functions and properties; probably something like "character.view=..." or "character.setview(...)". 
Title: Re: changing walk cycle?
Post by: myname on Sat 06/08/2011 16:01:41
Thanks, sounds easy enough.  So this should allow my character to move about in all directions like his normal walk cycle?
Title: Re: changing walk cycle?
Post by: barefoot on Sat 06/08/2011 16:33:01
Once you've changed the characters view (say from normal view 4 to new view 5 where he loses control of his legs) through a function or action

example:


cEgo.ChangeView(5);


cEgo's walk cycles will then be the loops in view 5 ie up, down, left and  right, provided you have them in view 5 of course. Simply change back as required..

Don't forget about the Idle view! check out SetIdleView in AGS Manual.


Title: Re: changing walk cycle?
Post by: on Sat 13/08/2011 15:30:09
Like other said, make one if you want to change character's view to the different view (Let's say character is named cChar, and you want him to change to view that is numbered 3):

{
           cChar.LockView(3);
}
Title: Re: changing walk cycle?
Post by: Khris on Sat 13/08/2011 16:53:38
Like barefoot explained, to change the appearance/walk-cycle permanently, the proper command is Character.ChangeView().

Character.LockView() is used to temporarily change the view in order to perform an animation; the character won't walk properly until Character.UnlockView() is called (which gives control back to AGS).
Title: Re: changing walk cycle?
Post by: monkey0506 on Sun 14/08/2011 06:15:08
I think that 11 spaces for a single level of indentation is a new record. Dual must feel so vindicated right about now. :-\