Hi all,
I've been reading most of the cursor threads and I am still struggeling with this one.
I've setup the Pointer to be always the active cursor unless I am on a hotsop or an Object - it's the only one with StandardMode = True.
Then on every hotspot I've added under : Mouse moves over hotspot - this code :
mouse.SaveCursorUntilItLeaves();
mouse.Mode = eModeInteract; // or eModeLookAt...
So now, it changes to the proper cursor and comes back to my pointer when I leave the hotspot.
I also have a Repeat execute for my room objects.
function room_RepExec()
{
if (Object.GetAtScreenXY(mouse.x, mouse.y) == oBluecup) {
mouse.SaveCursorUntilItLeaves();
mouse.Mode = eModePickup;
}
and this also work.
My 2 issues :
1 -
When I select a Inventory Object and I want to place it on a Hotspot, the Inventory cursor will switch to the Pickup Icon because of the hotspot, or if I move the Inventory cursor on the edges of the screen, I move over an other hotstop and It also changes. I would like the eModeUseinv to override all the hotspot changes and to only change to pointer when I right click.
2 -
when I have a Hotspot that could have 2 different behaviors. ( Look and interact ) What should I do ?
Thanks
amuse
You'd have to expand the scipt a little.
function room_RepExec()
{
if(Mouse.Mode != eModeUseinv){
if (Object.GetAtScreenXY(mouse.x, mouse.y) == oBluecup) {
mouse.SaveCursorUntilItLeaves();
mouse.Mode = eModePickup;
}
}
I don't understand what you want to do if you have 2 options. You can't display 2 cursors at a time...
Thanks for the reply - I guess I am still having issues when I try to apply this to different hotspots
I add the code line of the mouse.Mode to the hotspot code.
function hHotspot2_MouseMove()
{
if(Mouse.Mode != eModeUseinv){
mouse.SaveCursorUntilItLeaves();
mouse.Mode = eModeLookat;
}
}
And I am still getting the undesired cursor changes when passing over other hotspots.
For number 2 - the logic behind it was - being able to Look at a hotspot and also being able to interact at that same hotspot. ( or Talk and Look ) but like you said: How then?
Perhaps what I need would be this:
General Cursor Pointer when Not over any hotspot or GUI
Cursor changes over a hotspot to the normal multi cursor mouse wheel.
This way, the player could choose the task he wants to perform on the hotspots depending on what is available to him ( Interact hotspot, Look Hotspot, pick up hotspot,talk... ).
Is this possible ?
amuse.
Ok, I got number one to work with your code -
I had to change de default cursor. Having the Interact cursor instead of the Pointer cursor gives the proper behaviour now.
Thanks.
Ianic
Quote from: amuse on Thu 18/02/2010 17:32:14
This way, the player could choose the task he wants to perform on the hotspots depending on what is available to him ( Interact hotspot, Look Hotspot, pick up hotspot,talk... ).
Something like the Verb Coin interface found in CoMI? That is implemented in AGS as a standard GUI, so you should be able to extend it to your needs.