Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Candle on Tue 25/04/2006 19:12:01

Title: Where to add the repeat?
Post by: Candle on Tue 25/04/2006 19:12:01
This does not seem to be right as it does not repeat:
character[ROCKTOSSERB].Animate(0, 1, 0, eRepeat, eForwards);
character[ROCKTOSSERA].Animate(0, 1, 0, eRepeat, eForwards);
Title: Re: Where to add the repeat?
Post by: Ashen on Tue 25/04/2006 19:18:54
Hmm, looks like the manual's a little confusing on that one ... It doesn't use the enum like it probably should.
Repeat should be the third parameter - in the manual example and your code it's 0 (i.e. eOnce, or no repeats). The parameter you're got as eRepeat is actually the blocking, so it needs to be:

character[ROCKTOSSERB].Animate(0, 1, eRepeat, (whatever Blocking style you want), eForwards);

And the same for ROCKTOSSERA.
Title: Re: Where to add the repeat?
Post by: Candle on Tue 25/04/2006 19:24:13
ya it had me going . lol
thanks for the help.
Title: Re: Where to add the repeat?
Post by: Candle on Wed 26/04/2006 21:54:15
If I do they both work at the sametime.
character[ROCKTOSSERA].SetIdleView(33, 0);
character[ROCKTOSSERB].SetIdleView(34, 0); 
If I do it this way they don't.
//character[ROCKTOSSERB].Animate(0, 5, eOnce, eBlock, eForwards);
//character[ROCKTOSSERA].Animate(0, 5, eOnce, eBlock, eForwards);
What I would like them to do it toss rocks (animate) at the sametime for so many loops/sec then stop and go back to the room it started from.
This would be in the Player inter screen first time.
Then I don't have to use the avi of therm doing it.
Title: Re: Where to add the repeat?
Post by: Khris on Thu 27/04/2006 00:34:41
In the first command, use eNoBlock instead of eBlock, otherwise the first animation will block (halt) the game until it's finished.

Oh and RTFM.
Title: Re: Where to add the repeat?
Post by: Candle on Thu 27/04/2006 00:40:04
You don't know how I hate to see this
Oh and RTFM
So I will keep my mouth shut right now.
And if you look you didn't answer my whole question. SRTP..
Title: Re: Where to add the repeat?
Post by: Candle on Thu 27/04/2006 02:23:18
NM I got it solved with using a cutscene.
Title: Re: Where to add the repeat?
Post by: Scummbuddy on Thu 27/04/2006 14:29:55
KhrisMuc - it was a simple mistake so I don't think rolling out the RTFM was all that neccesary.

Candle - you have to learn to let things roll off your back. If you know you know better than just disregaurd his post for the most part.

And please, remove or edit your new line from your signature. I've gotten complaints from others so please respect others, and we'll respect you by not throwing the manual at you again.  ;D