Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - spooey

#1
This works perfectly, cannot thank you enough! And it really will save so much time this way, too.
#2
Hello,
As a learning exercise, I'm trying to make a loose recreation of some of the mechanics of MYST. To this end, I have set up hotspots that when clicked, send the player to a different Room corresponding to where they clicked (for example, if the player wants to look to their left, and the player clicks the hotspot over the left region of the screen, they will be sent to a room representing that viewing angle). To simulate the MYST experience further, I'm experimenting with custom cursors that point in the direction the player wants to go (points left if over the 'turn left' hotspot, right if over the hotspot to the right - that sort of thing).

The scripts I use are:
Code: ags
function hHotspot2_MouseMove()
{
  mouse.SaveCursorUntilItLeaves();
  mouse.Mode=eModeTurnleft;
}

function hHotspot2_AnyClick()
{
  player.ChangeRoom(2);
}


So the thing is:
If the mouse is moved over a 'turn left' hotspot, it changes to a new mouse.Mode (eTurnleft). If that hotspot is clicked, it transitions to Room 2. And, if you click the hotspot in Room 1 and then don't move the mouse, it will still be touching another 'turn left' hotspot that would call for eTurnleft (the hotspot in the left region of Room 2).
The problem is, following the transition, the mouse will be reset to its default mouse.Mode until it is moved, despite starting already on top of the hotspot that would turn it into eTurnleft.

My assumption is that 'hHotspot2_MouseMove()' isn't checking for the mouse touching the hotspot, it's literally checking for the mouse being moved while touching the hotspot. 'mouse.SaveCursorUntilItLeaves' may also be contributing, too, since the cursor is 'leaving' by changing rooms.

The behavior I want to do, if possible, is that if the mouse exits a screen in one Mode, and it starts in the next room on a hotspot with the same MouseMove function, that it maintains the Mode rather than waiting to be moved.

(here is a demonstration to clarify - pay attention to the cursor behavior when it is not moving)



Any help is greatly appreciated, and thanks very much for your time.
#3
Hello, I am having a similar issue - I thought I should post in this thread rather than make my own so any solutions are in one place. Please correct me if this isn't ideal.

My version of the issue is that using the 'hHotspot_AnyClick' function only works if the setting 'ShowPlayerCharacter' is set to True - otherwise, it seems to break the game (after clicking the hotspot, nothing else is clickable - even the UI, which also changes visually). Here is a demonstration:





Any help would be greatly appreciated - sorry if the solution is staring me in the face  :sealed:
SMF spam blocked by CleanTalk