I modified my cursor so that it has only 2 views, 1 general and 1 which changes when I hover over a hotspot. The problem that I'm having is that when I need to take an emblem(inventory item) out of my inventory and place it somewhere it doesn't actually with hold the emblem(inventory item).
Have you got this in general settings set to true?
Override built-in inventory window click handling
try setting it to false if not already.
Also, check that your inventory window height and width of items are set ok and that the hotspots of your inv items are positioned ok so the mouse interacts with them OK.
How exactly did you modify the cursors? Which cursor modes is your game using?
If inventory clicks are handled by the engine (the default setting) the proper cursor mode to pick up an inventory item is eModeInteract.
Okay checked those and it all looks in order...
I'm using this:
function repeatedly_execute() {
if (IsGamePaused() == 1) return;
UpdateMouseGraphic();
CustomizeIconBar();
int mm = mouse.Mode;
int nm; // newMode
Hotspot *h;
Object *o;
int lt = GetLocationType(mouse.x, mouse.y);
if (nm != eModeUseinv){
if(lt == eLocationNothing) nm = eModeWalkto;
if(lt == eLocationHotspot){
h = Hotspot.GetAtScreenXY(mouse.x, mouse.y);
nm = h.GetProperty("def_curs");
}
if(lt == eLocationObject){
o = Object.GetAtScreenXY(mouse.x, mouse.y);
nm = o.GetProperty("def_curs");
}
if(lt == eLocationCharacter){
nm = eModeTalkto;
}
if(nm != mm)mouse.Mode = nm;
could be wrong but I think your testing new mode whether is it eModeUseinv. If you just change that line to:
if (mm != eModeUseinv){
Thank You that worked (nod)
That code looks suspiciously like something I may have written; did you get that from the forum? Because if that error is in the original code, I'd like to fix it.
Quote from: Khris on Thu 12/10/2017 14:08:24
That code looks suspiciously like something I may have written; did you get that from the forum? Because if that error is in the original code, I'd like to fix it.
Is it this one:
http://www.adventuregamestudio.co.uk/forums/index.php?topic=46959.msg631494#msg631494
Probably not but kind of on the right track maybe?
Yes I did get the code from the forum lolz and yes you did post it previously, your code is really helpful. Thanks