Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Thanks so much! I've just tried this and am getting the error:

AttributeError: 'NoneType' object has no attribute 'get_cursor_coords'

I called the function with:

vc = VirtualCursor()
renpy.show_screen("locked_tooltip", data.title, vc.get_vc_position(id), data.unlocked)

Sorry if i'm missing something super obvious!

To be clear - the point is to give an existing virtual cursor an id like id "whatever" and you pass in "whatever" to the function I wrote. Do not create a random virtual cursor and try to get coordinates from it - the one you made in your example code isn't shown anywhere and thus any information it had would be entirely useless, even discounting the fact that the function I made wants an ID and not a VirtualCursor object. If you already have a Python VirtualCursor object defaulted instead of declared via virtual_cursor in a screen, then just call get_cursor_coords() on your VirtualCursor object. Again, do not just create a random VirtualCursor object - this must be the virtual cursor you are already using.

Ah, I got it working, thanks again! I'm not used to this kind of thing, thanks for providing such an indepth tool.