Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: R4L on Sat 29/11/2003 09:38:11

Title: Ags-Serious Error
Post by: R4L on Sat 29/11/2003 09:38:11
FollowCharacterEx(COSMO,HOUSE,10,97);
Wait(10);
ChangeCharacterView(COSMO,4);
Wait(10);
AnimateCharacter(COSMO,0,5,0);
Wait(10);
ChangeCharacterView(HOUSE,6);
Wait(10);
ChangeCharacterView(COSMO,1);
Wait(5);  
FollowCharacter(0,1-);

This is my script for if I want my character to go up to the other character( who is actually a house) and use the key on him to open him. After I put the Wait(5); and FollowCharacter(0,1-_; I went to save it and this came up

Exception 0xC0000005 at EIP=0x00480A9D,AGSE 2.56.413

What the hell is that error? When I take out the Wait(5); and FollowCharacter(0,1-);, It has no problem, but the character won't walk ALL the way to the character.

Anyway I can fix this, or anyone have a better script? Please contact me at Xpac3491@aol.com or on my aim name Rap4Life42o, or just post it here. Any help will be appreciated greatly!
Title: Re:Ags-Serious Error
Post by: scotch on Sat 29/11/2003 09:43:04
Not sure if this is what's causing the error but it should be FollowCharacter(0,-1); I think.

Why are you using FollowCharacter() to make him walk to the house, instead of MoveCharacterBlocking()?  Follow character is for making characters follow other characters...
Title: Re:Ags-Serious Error
Post by: R4L on Sat 29/11/2003 09:48:10
Well cause my character HOUSE is at 222,236. So I tried MoveCharacterBlocking and my main character walked like, not even a quarter of 222,236. So anyway I can do anything?
Title: Re:Ags-Serious Error
Post by: scotch on Sat 29/11/2003 09:50:45
It may be that your character is colliding with the house when you try to walk there, check the 'Can be walked through' option on the house character.
Title: Re:Ags-Serious Error
Post by: R4L on Sat 29/11/2003 09:55:48
Nevermind, that MoveCharacterBlocking is working all of a sudden. Thanks for the suggestions! ;D
Title: Re:Ags-Serious Error
Post by: Scorpiorus on Sat 29/11/2003 13:47:45
QuoteFollowCharacter(0,1-);
It's still strange. I just checked it and yes AGS quits with an error message when tries to parse it. CJ?

~Cheers
Title: Re:Ags-Serious Error
Post by: Pumaman on Sat 29/11/2003 14:34:26
Hmm so it does. Well spotted, I'll get the compiler fixed - but yes, the cause of the problem is your script error - it should be

FollowCharacter(0,-1);

not

FollowCharacter(0,1-);
Title: Re:Ags-Serious Error
Post by: R4L on Sat 29/11/2003 15:41:06
Allrighty then. Thanks a bunch!  ;D