Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Calin Leafshade on Thu 03/06/2010 20:25:12

Title: How to check for SkipUntilCharacterStops(player.ID)
Post by: Calin Leafshade on Thu 03/06/2010 20:25:12
My game (McCarthy2) has a feature whereby double clicking skips the walking part on blocking commands..

however I use a custom script for playing my footstep sounds and using this SkipUntilCharacterStops(player.ID) command causes a load of footstep sounds to be played since they are triggered in the script. Is there anyway to check to see if this command has been run?

Title: Re: How to check for SkipUntilCharacterStops(player.ID)
Post by: Khris on Thu 03/06/2010 23:59:18
You could try checking Game.SkippingCutscene, not sure if it works though.
Title: Re: How to check for SkipUntilCharacterStops(player.ID)
Post by: GarageGothic on Fri 04/06/2010 10:20:04
Never had this problem and I also run my footstep sound script from rep_exec_always instead of using frame-triggered sounds, so maybe you just need to rethink how footsteps are played. Either limiting the number of channels used or checking Character.Moving. Another solution would be to replace the SkipUntilCharacterStops call with your own teleportation script. Just use a dummy character with a WalkSpeed of 0 to first find where the character will end up, then move the actual character to those coordinates.

A lot of AGS' built in solutions are fundamentally flawed in one aspect or another. I'm not saying this as a criticism, they usually work for what they're intended for (and no way CJ could be expected to imagine all the weird shit we force his engine to do), but rather to suggest that a lot of the times you're doing something non-standard you're better off scripting your own version instead of struggling with behind-the-scenes engine mechanics that you don't have full insight into. This is also one of main annoyances with feature suggestions for shortcuts to stuff that can already be done easily through script.
Title: Re: How to check for SkipUntilCharacterStops(player.ID)
Post by: Dualnames on Fri 04/06/2010 12:27:10
My game (HHGTG) has the same feature and that never happened. If you're playing footsteps via some repeatedly execute script just put Game.SkippingCutscene on top of it, if you're doing it via frame you should use AnimationRunScript module and use the same function (Game.SkippingCutscene) on the repexecalways script of the module.
Title: Re: How to check for SkipUntilCharacterStops(player.ID)
Post by: NsMn on Fri 04/06/2010 13:06:04
I would not estimate you as that stupid, but do you have a "player.Moving" anywhere in your footstep script...?