Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: myname on Mon 21/05/2012 01:00:45

Title: player freezes pose after dialog *FIXED*
Post by: myname on Mon 21/05/2012 01:00:45
After a dialog where the player acquires an object my player freezes facing in one direction and when I try to walk somewhere else he just slides backwards to the point clicked.  Here is the option script in the dialog thanks in advance for any help:

@3
  player.FaceCharacter(cNancy,eBlock);
Nancy:You son of a bitch!
Nancy:I'll slice your face off, drape it over my cat's litter box, throw it in the oven at 350 degrees for 55 min, and feed it to your moth...
  cSteve.LockView(18);
  cSteve.Animate(0,5,eOnce,eBlock,eForwards);
  cSteve.UnlockView();
Steve:Count it
  Wait(40);
Nancy:Oh my.
Nancy:My lord.
  Wait(40);
Nancy:This is absolute heaven.
Steve:It's extra strength.
Nancy:Oh, you are still here.
Nancy:Leave me and take whatever you want prick.
  player.LoseInventory(iciggum);
  player.Walk(247, 121,eBlock);
  Wait(20);
  player.ChangeView(26);
  player.Animate(0,1,eOnce,eBlock,eForwards);
  Wait(20);
  player.AddInventory(iwatercooler);
  object[1].Visible = false;
  player.Say("Finally, now Jasper can mop up.");
stop
Title: Re: player freezes pose after dialog
Post by: strategyjunkie on Mon 21/05/2012 01:33:46
your script looks fine. have you checked the userGUI in the editor?
Title: Re: player freezes pose after dialog
Post by: myname on Mon 21/05/2012 01:43:58
Thanks for the response strategyjunkie but I'm not sure exactly what I'm supposed to check in the GUIs settings.
Title: Re: player freezes pose after dialog
Post by: on Mon 21/05/2012 02:10:06
Quote from: myname on Mon 21/05/2012 01:00:45
  player.ChangeView(26);
  player.Animate(0,1,eOnce,eBlock,eForwards);
  MISSING UNLOCKVIEW!!!! <--
  Wait(20);
One UnlockView is missing- add it, and things should work all right.


Quote from: myname on Mon 21/05/2012 01:00:45
Nancy:I'll slice your face off, drape it over my cat's litter box, throw it in the oven at 350 degrees for 55 min, and feed it to your moth...
I want to see that animated!!!  ;-D
Title: Re: player freezes pose after dialog
Post by: myname on Mon 21/05/2012 04:17:04
Ha, thanks.  I don't  think I have the animating chops for that yet.  I put in the new script and I still had the same problem.  Here it is.

@3
  player.FaceCharacter(cNancy,eBlock);
Nancy:You son of a bitch!
Nancy:I'll slice your face off, drape it over my cat's litter box, throw it in the oven at 350 degrees for 55 min, and feed it to your moth...
  cSteve.LockView(18);
  cSteve.Animate(0,5,eOnce,eBlock,eForwards);
  cSteve.UnlockView();
Steve:Count it
  Wait(40);
Nancy:Oh my.
Nancy:My lord.
  Wait(40);
Nancy:This is absolute heaven.
Steve:It's extra strength.
Nancy:Oh, you are still here.
Nancy:Leave me and take whatever you want prick.
  player.LoseInventory(iciggum);
  player.Walk(247, 121,eBlock);
  Wait(20);
  player.ChangeView(26);
  player.Animate(0,1,eOnce,eBlock,eForwards);
  player.UnlockView();
  Wait(20);
  player.AddInventory(iwatercooler);
  object[1].Visible = false;
  player.Say("Finally, now Jasper can mop up.");
stop
Title: Re: player freezes pose after dialog
Post by: Khris on Mon 21/05/2012 08:44:42
.ChangeView changes the view permanently.
You need to use .LockView, like further up in your code, then .UnlockView after the animation.
Title: Re: player freezes pose after dialog
Post by: myname on Tue 22/05/2012 00:57:16
Fixed.  Thank you Khris.