Trouble with idle veiw setting [SOLVED]

Started by Mats Berglinn, Tue 02/08/2005 20:38:44

Previous topic - Next topic

Mats Berglinn

I've got some problem with setting a idle veiw. At the start of my game there'll be a cutscene in which there are the main character and another character. The idle veiw I have for the non-main character is set that he blinks when he stands but since he sits all the time in the cutscene I have turned it of with SetIdleVeiw(-1,10) and then in the next room I've set on the idle veiw (which is 57) but nothing hapens (even if the character is suppoused to blink since he doesn't move or talk for quite awhile). When I quit the game I get this warning:



What have I done wrong? What should I do to correct this error?

Here's the script for it (Note: If you don't want to know the beginning of my game don't look):

Spoiler

StartCutscene(1);
Wait(40);
SetCharacterIdle(CRI,-1,10);
ChangeCharacterView(EGO,53);
SetCharacterSpeechView(EGO,53);
ChangeCharacterView(CRI,48);
SetCharacterSpeechView(CRI,54);
Wait(10);
DisplaySpeech(EGO,"My name is Torleif Shufflefoot.");
DisplaySpeech(EGO,"That monkey over there is my pet, Crispy.");
DisplaySpeech(EGO,"I might don't look like it but I'm a pirate.");
DisplaySpeech(EGO,"It wasn't too long ago when I became a pirate.");
DisplaySpeech(EGO,"In fact, it was only a couple of weeks ago.");
DisplaySpeech(EGO,"So far, the pirate biz haven't worked out very well.");
DisplaySpeech(EGO,"The last time, we joined a pirate crew and it ended with we got marooned on a deserted island.");
DisplaySpeech(EGO,"Sigh! If I only were paying attention to the cooking instead of daydreaming the kitchen wouldn't have caught on fire.");
DisplaySpeech(EGO,"We escaped from the island by making a raft out of old timber and shipwrecks.");
DisplaySpeech(EGO,"We have been on here on the sea for three days.");
DisplaySpeech(EGO,"The food have almost run out and there's only a couple of chunks of water left.");
DisplaySpeech(EGO,"It seems that we're done for if not a boat will turn up or that we will find land.");
DisplaySpeech(EGO,"Which is the worst? Failing in piracy or starve to death on the ocean?"); 
Wait(10);
AnimateCharacter(CRI,2,0,0);
Wait(80);
DisplaySpeech(CRI,"Ooh-ooh-ooh!");
DisplaySpeech(CRI,"Ee-aah-ooh!");
SetCharacterView(EGO,55);
AnimateCharacter(EGO,1,0,0);
SetCharacterSpeechView(EGO,5);
Wait(10);
DisplaySpeech(EGO,"Hey Crispy! What is it, boy?");
Wait(40);
DisplaySpeech(EGO,"Land Ho!");
DisplaySpeech(EGO,"Way to go, Crispy!");
DisplaySpeech(EGO,"Now, let's head to that island...");
DisplaySpeech(EGO,"...for the adventure!");
DisplaySpeech(EGO,"For swashbuckeling...");
DisplaySpeech(EGO,"...and for the prime honor of pirates!");
Wait(20);
DisplaySpeech(EGO,"And to go to the bathroom!");
DisplaySpeech(EGO,"Let's go!");
GUIOn(0);
GUIOn(1);
SetCharacterSpeechView(EGO,4);
ReleaseCharacterView(EGO);
ReleaseCharacterView(CRI);
Wait(10);
NewRoomEx(1,100,190);
NewRoomNPC(CRI,1,60,190);
SetCharacterSpeechView(CRI,35);
SetCharacterView(CRI,7);
EndCutscene();


  // script for room: First time player enters screen
StartCutscene(1);
SetCharacterIdle(CRI,57,10);
Wait(5);
DisplaySpeechBackground(SKULL,"5 mintutes of paddling later...");
Wait(80);
FaceCharacter(EGO,CRI);
FaceCharacter(CRI,EGO);
DisplaySpeech(EGO,"We finally made it to land.");
DisplaySpeech(EGO,"I just wonder where we are.");
DisplaySpeech(TOUR,"&1 You have landed on Touche Island, sir.");
FaceCharacter(EGO,TOUR);
DisplaySpeech(EGO,"Hi there, I'm Torleif Shufflefoot, newly gratuaded pirate!");
DisplaySpeech(TOUR,"&2 Really? You remind me more of a flooring inspector.");
DisplaySpeech(EGO,"Are you trying to pull a Monkey Island cliche on me?");
DisplaySpeech(TOUR,"&3 To be honest, no. You don't look so much like a pirate to me.");
DisplaySpeech(EGO,"You have no idea how many have told me that.");
DisplaySpeech(TOUR,"&4 Anyway, what brings you here?");
DisplaySpeech(EGO,"I just floated here after escaping from a island.");
DisplaySpeech(TOUR,"&5 You have been marooned, right?");
DisplaySpeech(EGO,"Does it show?");
DisplaySpeech(TOUR,"&6 Kind of.");
DisplaySpeech(EGO,"Do you know anything good to do to make the pirate career better?");
DisplaySpeech(TOUR,"&7 Depends.");
DisplaySpeech(TOUR,"&8 But if you're seeking for REAL challenges you should search for the legendary lost treasure of LeDrake.");
DisplaySpeech(TOUR,"&9 Pirates have searched for it for generations but none have managed to found it.");
DisplaySpeech(EGO,"Wow! If I find it, I'll become famous!");
DisplaySpeech(EGO,"Uh... do you know where I should start looking for clues?");
DisplaySpeech(TOUR,"&10 The best place to get gossips and information is in the village Pueblo Pequeno.");
DisplaySpeech(TOUR,"&11 Just walk to the east and you'll eventually get there.");
DisplaySpeech(TOUR,"&12 It's impossible to miss it.");
DisplaySpeech(EGO,"Thanks a lot!");
FaceCharacter(EGO,CRI);
DisplaySpeech(EGO,"Ok, Crispy, let's go!");
DisplaySpeech(CRI,"Ee-ee-ee-ah.");
FaceCharacter(EGO,TOUR);
DisplaySpeech(TOUR,"&13 Good luck.");
FollowCharacterEx(CRI,EGO,2,5);
MoveCharacter(EGO,399, 209);
Wait(200);
NewRoom(16);
EndCutscene();
[close]

monkey0506

I'm guessing that this means when you called SetIdleView() from the room script it still hadn't been released from the view you set the character to with SetCharacterView().  Perhaps make sure that for every time you call SetCharacterView() you call ReleaseCharacterView().  And I think it has to do with:

Code: ags
SetCharacterView(CRI,7);
EndCutscene();


  // script for room: First time player enters screen
StartCutscene(1);
SetCharacterIdle(CRI,57,10);


You set CRI's view at the end of the cutscene, but then you didn't release it before changing his idle view (in the beginning of the next cutscene).

Mats Berglinn

It doesn't work! If I use ReleaseCharacterVeiw the veiw will go back to the sitting veiw when it should be the standard standing veiw (and walking). The idle work does play up but it's wrong since he sits down and suddenly rise up to blink and after that return to the sitting position.

I've tried with an alternative in the first cutscene:

ReleaseCharacterView(EGO);
ReleaseCharacterView(CRI);
Wait(1);
SetCharacterIdle(CRI,57,10);
SetCharacterView(CRI,7);
SetCharacterSpeechView(EGO,4);
SetCharacterSpeechView(CRI,35);
SetCharacterView(EGO,3);

The reason for that I changing the character veiws is that the ReleaseCharacterVeiws changes back to the sitting veiws (even if the original veiws actually are the standing/walking veiws) and therefore had to use SetCharacterVeiw to set them to the proper veiws. The program shows no warning messages but the characters idle veiw doesn't play up. This drives on my nerves! Please help me out of this problem!

Also, I'm using AGS 2.62 (again, for those don't know, the reason for that is the template I'm using isn't updated to 2.7).

monkey0506

You did use ChangeCharacterView() at the top of the script.  You do of course realize that this function is for permanently changing the character's normal view, right?  I don't know which views are which, so if you could also just put a comment out to the side or something that would help as well.

Mats Berglinn

I didn't knew that ChangeCharacterVeiw changed the standard veiw permently. Anyway, thanks for the help! It is working now.

monkey0506

I'm not sure how exactly the old manual reads, but in the new manual (AGS 2.7+) there are warnings.  Glad I could help. ;)

SMF spam blocked by CleanTalk