Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Alynn on Tue 19/06/2007 06:55:34

Title: BUG: Abnormal Behavior for cursor modes 2.72
Post by: Alynn on Tue 19/06/2007 06:55:34
Ok this is 2.72, but I noticed something

I have cursor mode 4, (use active inventory) mode named as eModeUseCurI, and at one point I had cursor mode 10 (select your active inventory) mode as eModeUseInven.

What I noticed, that even though the editor recognized eModeUseInven, and eModeUseCurI it didn't recognize eModeUseInven as mode 10, it still thought it was mode 4.

Easy workaround was to change all instances of eModeUseInven to eModeSelectInv, however if anyone else has this problem I just wanted to point out that eModeUseInven will default to mode 4 even if you have UseInven set as a different mode number.
Title: Re: BUG: Abnormal Behavior for cursor modes 2.72
Post by: SSH on Tue 19/06/2007 09:39:14
Its probably generally advisable not to try to redefine built-in constants
Title: Re: No BUG: Standard behavior for cursor modes 2.72
Post by: Khris on Tue 19/06/2007 12:24:26
Out of curiosity I've renamed the cursors like you described, then put this in the first room's script:
  // script for Room: Player enters room (after fadein)
  mouse.Mode=eModeUseInven;
  Display("Mode: %d", mouse.Mode);


It displayed "Mode: 10".

Renaming the cursors will only rename the enum names, not change any internal stuff.
It won't even rename the Interaction events.

Keep in mind that AGS automatically changes the mouse.Mode to mode 4 as soon as you set player.ActiveInventory to an InventoryItem.

So: no bug.