Cursor mode issue (solved)

Started by Alynn, Mon 18/06/2007 20:21:54

Previous topic - Next topic

Alynn

Ok, so I have a custom inventory box. I am handling inventory clicks in script, and I'm not using inventory items as cursors.

However I've run into a strange problem where when I click the use interaction, the talk cursor appears, and any inventory clicks count as if I'm using the talking mode. This is in a non walkable room. In a walkable room it just keeps the last interaction selected.

I've tripple checked, and all the buttons are set to the correct cursor modes on click (using the change cursor mode option). Yet everytime I hit the Use button (mouse mode 4) it uses either mode 1 or the last choosen mouse mode.

I've tried doing it by script (Mouse.Mode) but the result is the exact same.

So my question is, did I do something wrong, or is this indeed a bug?

Khris

Since you've mentioned it, afaik, the option not to use inventory items as cursors will only affect the mouse cursor's graphic, i.e. AGS won't use the inv item's sprite but the sprite set as use-inv cursor.

This only happens in a room without walkable areas. Did you by any chance disable the interact cursor instead of the walk cursor?

Going from the item reactions, it looks like you're indeed using the talk mode; I believe AGS tries to set the cursor mode to interact but fails (because it's disabled), so it simply picks the next active one: talk to.

Alynn

It chooses the talk mode when Hide Player Character is chosen for that room.

If I'm in a room that the player character is not hidden it uses the last chosen mode. IE If I'm in walk mode, and I click Use, it stays Walk mode, if I'm in look mode and click use, it stays in look mode.

That's exactly my point. I have a seperate Use Inventory cursor sprite, and it doesn't show up at all when I click the Use mode. The more I play with it the more it seems bugged.

Khris

Just to clarify this: are we talking about the Interact mode or the UseInv mode?
It seems to me like you're confusing the two, at least when talking about them.

So the button that's not working is supposed to turn the cursor into a hand which is then used to interact with an inventory item?
Or is it supposed to set the mode to UseInv, in order to use the still active inventory on some other item in the inventory?

Alynn

The button is supposed to change to Mode 4, which is Use Inventory. I know exactly what I mean.

It is supposed to turn it into an arrow, since I'm not using inventory items as cursors, therefore it should be using the arrow which is set as the cursor graphic for mouse mode 4.

Ashen

Do you have an Active Inventory item set? If not, switching to mode 4 won't do anything - picking the closest 'standard' mode (eModeTalkto) or sticking with the last selected mode would make sense in this case. This is true regeardless of whetehr you're using Item graphics or a single cursor.
I know what you're thinking ... Don't think that.

Alynn

Bah, then I guess I'll just have to code up my own UseInventory cursor mode thing.

Alrighty then. Thanks

Ashen

What're you after? There might be an existing workaround. (I'm guessing it's not as simple as this BFAQ entry.)
I know what you're thinking ... Don't think that.

Alynn

No, it's not that simple... I may be rusty, but I'm not a moron :P

After what you mentioned in your second to last post I realized that it's not Use Inventory, it's Use Current Inventory. So I just created a new cursor mode that is Use and put all my script into my custom inventory handler I'm working on.

basically mode 10 (use mode) will let you choose an inventory item, then that will become the current active inventory item for the character, then switch to mode 4 to use the item.

Like I said before, just rusty, you forget these little things when you don't mess with this stuff after a few months.

Khris

See? That's the reason why I've asked you about the mode.
I didn't mean to offend you.

With the cursor mode set to "Use inv" mode, a click will run the "Use inv on x" interaction. How's that supposed to happen/make sense if there's no active inventory item?

The default way is:
-change to interact mode
-click an inv item -> ActiveInventory is set, mode is changed to UseInv

If you check "Handle inventory clicks in script", interacting with an inv item won't do the above but actually call the inv item's interact interaction.

So you can either use a property to distinguish between inv items that can be interacted with and ones which simply get selected as ActiveInv.

Or you do need an additional mode, one to interact with InvItems, a second one to select them as active.

SMF spam blocked by CleanTalk