Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: simulacra on Tue 10/05/2005 11:58:40

Title: Strange game crash [SOLVED]
Post by: simulacra on Tue 10/05/2005 11:58:40
I have a hotspot with the following code in "Any click on hotspot".

RunHotspotInteraction(7,MODE_WALK);

I want any click to be treated as a "Walk to command". What's wrong here?
Title: Re: Strange game crash
Post by: DoorKnobHandle on Tue 10/05/2005 12:07:43
How does the game crash? Any error messages? Are you sure that this command is the problem?

Please be a little more descriptive!
Title: Re: Strange game crash
Post by: simulacra on Tue 10/05/2005 12:24:08
---------------------------
Illegal exception
---------------------------
An exception 0xC00000FD occured in ACWIN.EXE at EIP = 0x0044DF5E ; program pointer is +6, ACI version 2.62.772, gtags (2,0)

AGS cannot continue, this exception was fatal. Please note down the numbers above, remember what you were doing at the time and notify CJ on the Tech forum.

(Room 16 script line 7)


Most versions of Windows allow you to press Ctrl+C now to copy this entire message to the clipboard for easy reporting.
---------------------------

I am pretty sure that the new code caused the crash - it didn't before and I have not changed the hotspot behaviour in any other manner.
Title: Re: Strange game crash
Post by: Ashen on Tue 10/05/2005 12:45:13
AFAIK, hotspots don't exactly have an interaction for MODE_WALK, which might be causing the crash - I think it'd be the same if you tried RunHotspotInteraction() with any mode that had nothing assigned to it. You could try MoveCharacterToHotspot (EGO, 7);, or ProcessClick (mouse.x, mouse.y, MODE_WALK) instead. However - if you've got a walk-to point set up, doesn't any click take you to it anyway (regardless of whether that mode does anything)? Or have I misunderstood?
Title: Re: Strange game crash
Post by: simulacra on Tue 10/05/2005 13:07:30
No, you have sorted it out. I should have used ProcessClick (mouse.x, mouse.y, MODE_WALK). Thank you for your help.