Somebody was reporting an issue in relation to my GotThere module in combination with a two-button interface. Turns out that after deselecting the current inventory item, the game naturally reverted to eModeWalkto instead of the game's default cursor eModeInteract. While trying to fix this without changing any module code, I ran into the following, really weird behavior (AGS 3.4.1 / Default Game):
When I try to disable eModeWalkto by setting its "StandardMode" property to false:
- game still starts with eModeWalkto active (fine, guess)
- current cursor eModeUseinv and player.ActiveInventory = null; sets mode to eModeWalkto
- mouse.SelectNextMode(); skips over it
- turning the mouse wheel north doesn't (this is basically a "bug" in the template code, since it should be consistent with turning it south)
To be fair, StandardMode isn't used to disable the cursor, it's used to tell AGS that you want custom behavior.
When I instead call
mouse.DisableMode(eModeWalkto); i.e. the proper method to remove a cursor from the game:
- game starts with eModeLookat as expected
- current cursor eModeUseinv and player.ActiveInventory = null; sets mode to eModeWalkto though
- mouse.SelectNextMode(); doesn't skip over it, i.e. doesn't care if the mode is disabled or not
- turning the mouse wheel north doesn't either (again a "bug" in the template, this time consistent with turning the wheel south)
When I turn off "StandardMode" and call
mouse.DisableMode(eModeWalkto); I get the expected mix of the inconsistent behavior.
Conclusion:
- mouse.SelectNextMode() needs to check whether a cursor is disabled
- setting player.ActiveInventory to null currently does no check whatsoever on its own
- the template's mouse wheel north handling is buggy
Hi Khris,
I'm trying to fix this issue in my game:
Quoteafter deselecting the current inventory item, the game naturally reverted to eModeWalkto instead of the game's default cursor eModeInteract
I am trying to create a one-click interface, using only eModeInteract and inventory items. I turned off Standard Mode for all cursors, and tried to put this
mouse.DisableMode(eModeWalkto);
mouse.DisableMode(eModeLookat);
mouse.DisableMode(eModeTalkto);
mouse.DisableMode(eModePickup);
in the default_options function.
The cursor still reverts to eModeWalkTo. Did you ever figure out a finite solution to this?