Hi, I wish to change the displayed cursor icon when the mouse is over hotspots with a specific label. I am planning to use the OnHotspotSelect **and **OnHotspotSelect events to change it and back. But then I realize there is only one MainCursor setting. Do I have to change all the main cursor settings in the Cursor Manager? Or is there a way to define another cursor, so I can just switch it?
Also, I realized there is a script mouseovericon
, may I ask how to use that properly?
Thanks.
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
What do you mean by "specific label". As in, the name of the Hotspot itself?
What's your Interaction method set to? If Context Sensitive, it's possible to change the cursor to match that of the Hotspot's Use interaction icon. Otherwise, you can define a "Hotspot cursor" graphic in the Cursor Manager that is shown when hovering over a Hotspot. This is what mouseOverIcon refers to.
If you want to change things by script, best to change this, rather than the Main Cursor graphic - as you can then do without an OnHotspotDeselect event.
To change this texture via OnHotspotSelect, you'd do something like:
Thanks. I mean the Hotspot label
KickStarter.playerInteraction.GetActiveHotspot ().GetFullLabel ()
I turned out using this:
if (KickStarter.settingsManager.movementMethod == MovementMethod.PointAndClick &&
KickStarter.playerInteraction.GetActiveHotspot ().GetFullLabel () == "ExitCloseUp")
{
KickStarter.cursorManager.allowInteractionCursor = true;
} else {
KickStarter.cursorManager.allowInteractionCursor = false;
}
So that I can predefine all the cursor details as one of the Interaction Icons, without needing to change the texture of other settings.
Hi @ChrisIceBox, I'm using the latest Adventure Creator version (1.75.6) and this code is not working anymore. I think there is a bug on "ClearCache" function. There are 2 different implementation in CursorIcon class. One is overriding and hiding the concrete implementation.
I suggest this fix in order to make possible to use ReplaceTexture function.
Thank you @nova1337 - good spot!