BUG: Abnormal Behavior for cursor modes 2.72

Started by Alynn, Tue 19/06/2007 06:55:34

Previous topic - Next topic

Alynn

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.

SSH

Its probably generally advisable not to try to redefine built-in constants
12

Khris

Out of curiosity I've renamed the cursors like you described, then put this in the first room's script:
Code: ags
  // 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.

SMF spam blocked by CleanTalk