changing walk cycle?

Started by myname, Sat 06/08/2011 15:08:58

Previous topic - Next topic

myname

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.

RickJ

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(...)". 

myname

Thanks, sounds easy enough.  So this should allow my character to move about in all directions like his normal walk cycle?

barefoot

#3
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:

Code: ags
 
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.


I May Not Be Perfect but I Have A Big Heart ..

Bogdan

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):

Code: ags
{
           cChar.LockView(3);
} 

Khris

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).

monkey0506

I think that 11 spaces for a single level of indentation is a new record. Dual must feel so vindicated right about now. :-\

SMF spam blocked by CleanTalk