Object Animation Problem

Started by , Fri 09/03/2007 11:01:51

Previous topic - Next topic

VorLeo

Hi!
I am an absolut AGS beginner, so you may laugh about my question. But I tried to finad an answer in the manual and also in this forum, but was not succsessfull. (May have to do with my bad English...)

OK, gonna try to explain in simple words:

I have a TV-Screen, where the main character is looking to, so he is not visible in this room. The player can turn on the screen by pressing a button. No prob, so far... But now I wanna...

1. Start an animation of a TV News-speaker...
2. Let it repeat for some seconds...
3. show a massage...
4. Switch into another room.

I am helpless and tried about everything (but the right thing...)
Please, could somebody explain it to me? And may be, as he would explain it to a monkey?


Thanks a lot!

VorLeo

Ashen

#1
Please, explain a few of the things you have tried - even if they didn't work, we can maybe point out how you can fix them. Also, it'll give us an idea of where you're up to, to work from (have you created the View for the animation, and assigned it to the Object? Are you just having problems delaying the message and room change? Are you using scripting or Interation Editor commands? Do you want the player to be able to do anything while the animation is playing?)

Off hand, I'd say you could either use Timers to stop the animation, display the message and change rooms after a certain time, or use several blocking animations (assuming you don't want the player to be able to do anything) to delay them. Again: Details, please.
I know what you're thinking ... Don't think that.

VorLeo

#2
OK...
1.: I tried out anything, that seemd to be usual at the Room/Object-Editor.
2.: I created a view. Its just one loop, made of 4 frames. How to asign it to the object?
3. I think, I can handle the message and the room change, the main problem is to make the Animation run and stop it after a while (like 3 sec. or sth.)
4. I would prefer using the interaction editor, cause I am not realy experienced at scripting yet.
5. No, Player dont need to do anything, while the animation runs.

I have no Idea, how to use Timers or blocking animations...

Maverick

First set up the animation view as per the manual (you can use the interaction editor for this:
Code: ags

player enters room after fade in
object[x].SetView(view number);
object[x].Animate(int loop, int delay, optional RepeatStyle,
Ã,  Ã,  Ã,  Ã,  Ã,  optional BlockingStyle, optional Direction);//Repeatstyle = non blocking
//next action is run script
Wait(160); //abour 4 seconds (40 loops per second)
object[x].StopAnimating();
Character.ChangeRoom(int room_number, optional int x, optional int y)


Replace x with the actual object number and so forth.

If you get stuck then post your code so we can see where you are going wrong.

SMF spam blocked by CleanTalk