じ☆ve冰风 发表于 2026-7-26 09:53:53

Astra Cat's Simple Cursor Script

Hello again, 

I really like Mouse System Ex, and even though it uses a faster method than this one, I needed something much simpler in where I could also access some global variables pertaining to the mouse in a simple fashion. So here's the script. Make sure to put it after the script that creates your HUD graphics if you're creating a HUD, as your cursor will show you behind it rather than in front in that case.

Features: 

- Custom mouse cursor in pictures folder is required, default name is "cursor". I think you can use either PNG or bitmap graphics.

- Simple custom globals that are updated constantly for access in your rpg maker mv scripts.

Download (Updated 1 15 2016 - works fine with all scenes now)

https://gist.github.com/markhansaven/d20d1346be88ec15ae12#file-as_simplemousescript-js

Make sure it's called AS_SimpleMouseScript.js in your plugins folder.

Use:

Here are the globals you get: 

MouseX - cursor Y

MouseY - cursor X

MouseXGrid - cursor X in tiles

MouseYGrid - cursor Y in tiles

MouseXo - cursor origin X

MouseYo - cursor origin Y

MouseCustomCursorVisible - toggles visibility, has to be a string like 'true' or 'false', not true or false.

In any event you can create a script command and place this: 

MouseCustomCursorVisible = 'false';  

And it will toggle the visibility, in this case turning it off. Make sure to put the 'quotation marks in there' as it's a string.

License: 

Use it all you'd like, change it, modify it, make it better, or sell it and make a million dollars, I don't care. ; p

Demo:


本贴来自国际rpgmaker官方论坛作者:astracat111处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/astra-cats-simple-cursor-script.54888/
页: [1]
查看完整版本: Astra Cat's Simple Cursor Script