Playing View Loop according to variables

Started by RenatoDias, Wed 28/11/2012 03:36:17

Previous topic - Next topic

RenatoDias

Quote from: Khris on Wed 28/11/2012 22:53:14
Strictly speaking, AGS does have its own language. It's based on C++ and Java though.

For what you want, all you need to do is put this in the room's before fadein:

Code: ags
  cGirl.LockView(VIEW_NUMBER);
  cGirl.Animate(8, DELAY, eRepeat, eNoBlock);


In the untie interaction, call
Code: ags
  cGirl.UnlockView();

which will revert her frame handling to automatic standing/walking.
Neat. So, this code will keep looping? Nice. But, what if I put it AFTER fadein? Will it have any difference during the game when the player enters that room?
And just a cGirl.UnlockView(); function resets the character to the normal loops? That's really cool. Anyway, thanks to both you(Khris) and Crimson Wizard for helping me there. Thanks...

Icey

I just wanted to throw out there I thought he was making a on/off trigger for an animation. :x

Crimson Wizard

Quote from: RenatoDias on Wed 28/11/2012 23:15:25
Neat. So, this code will keep looping? Nice. But, what if I put it AFTER fadein? Will it have any difference during the game when the player enters that room?
There will be difference in how fast the animation starts. This also depends on Fade-in type you are using in your game. If animation starts before fade-in, then it will play during fade-in (when screen changes from black to room gradually). Sometimes it makes the difference, and sometimes it doesn't.

SMF spam blocked by CleanTalk