Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Request Mouse Script

Cait

Member

Okay, I've looked for a single mouse script that will do what I want it to do. However, what I found along with a nickel will buy you a nice warm cup of nothing. Let me explain what I need it to do.

1. Interact with the environment (click on chest, get chest, move if need be)
2. If object is unreachable like the skull in shadowgate, I most certainly do NOT want the character to walk up there.
(Basically, through comments, be able to change the reaction of the character)
3. Move with the mouse (You click to where you want the character to move and he/she goes)

It has to be for XP, and I've tried them all. WORATANA (who was suppose to be capable with XP, isn't. Unless I have the wrong version, which could be), Lampchops (doesn't do any of what I want), another one, blizzard... GRRR! :box: my urge to lash out irrationallly is rising and I really want to hit something... (T_T) Sigh.

The closest one I found that worked, EXACTLY the way I wanted it to was: WORATANA's mouse script with didn't work at all. I kept having an line 74 error, so it's likely not capable. Woratana said that it was usable for xp, and vx... "I" couldn't get it to work.
 
Okay, you're approaching this somewhat of the wrong way... let me try to help you getting where you want to.

First of all, you're not looking for a mouse script (which would suggest mouse input script, aka nothing to do with moving the character), but instead for a pathfinding script that's controlled by mouse input. The easiest way here is - from my point of view - to do it yourself by taking a mouse input script and a pathfinding script.
As for the mouse input, I can only suggest you Glitchfinder's Mouse Input Module, considering you probably want to use other mouse functions later in the game, and most aren't supported by your everyday mouse input script - Glitch's does.
Next, you need a pathfinding script. Your choice is pretty open here, because most pathfinding scripts for RPG Maker are based on the A* (say: "A-Star") method, however make sure it has an 'only move if reachable' option.

Now all you need is something like this (pseudocode):
Code:
if Mouse.pressed?(LBUTTON) and Mouse.in_screen?

  Pathfinding.move_character(Mouse.pos)

end

Respective for all the other features you want... I don't think it's going to be this hard really.


That being said, you could also tell us what exactly the error in line 74 is - after you tried it in a new, clean project, that is. If Woratana says it's compatible, I'd be surprised if it wouldn't be, so either way it can only be something marginal.
 

Cait

Member

Well, the thing is I swore he said it was compatible, but I could have been wrong. Line 74 says THIS: $mousec.bitmap = Cache.system($base_cursor)

But as I said, I might have been mistaken in what he said and or I might have the wrong version... >.< Which could be, with my experiences with scripts... = zero. o.o But anyway, I'll check again and see if that's the case. I just want a world where you interact with the environment and check things, click on things, and move things. I'll edit to if that turns out to be the case that it's NOT compatible.

(o.o) This is the thread, it says that it worked on VX without any edits, which would mean it would work on XP, too, right? (-.-) Well, my logic might be off a bit, but if it is please tell me and I can find another way... >.< I am not a scripter and made me wish I had learned...viewtopic.php?style=26&f=11&t=45155
 
Ah... actually, what he/she's talking about there is just one component of the script, being DerVVulfman's mouse input module that was originally created for XP, however works in VX without edits. Got nothing to do with the actual script in question.

I still don't see the specific error in your post, however I'm going to assume it's undefined method 'system' for Cache or something... not too familiar with VX anymore :/ Either way, while that would be an easy thing to fix as it's just the cursor graphic, you'll likely encounter other errors which likely makes it easier to do the method suggested above by me and putting several scripts together. You've come to the right place if you want someone to do this for you, however I can't as I'm lacking makers needed for testing here (and this is one of the things I couldn't really do without testing... XD )

All of that being said, it's never too late to learn ^^
 

Cait

Member

Ah, thanks. Well, that script is out, because I'm using xp. o.o Yeah, with that in mind, it's likely that I will have to do one of the following. 1. do it myself, by finding scripts, learning to script (it could happen), 2. hope someone makes does it for me (which is this is the right place, but ah, maybe 1 would be an easier direction) or 3. >.< pray that I can somehow get it to work, or move my project to VX, but I like the layers on XP better for this game. It's about the environment and VX isn't suited for what I need. ah, more thinking to do. Thanks for your help!

(NOTE: Although, I love to do this game in XP, because of the layers, I've since moved it to VX where it has the script I need. o.o)/ Thank you very much for the help!
 
So, I saw this thread, read it, and decided to do something about it. So I made a fairly basic implementation of my mouse script. It is incredibly basic, and hasn't been fully tested. However, it does everything you asked for in the OP, and I went ahead and integrated it with several of the default RM* windows as well. Anyway, go ahead and try it yourself:

Glitchfinder's Mouse Input Module Implementation

If that sounds like a mouthful, you'll notice I abbreviated it to Glitchfinder's MIMI in the project itself. Please note that it is in no way, shape, or form a finished product, and that it will probably need another scripter to fine tune before becoming fully integrated with RMXP.

While I do realize you moved to VX, I figured that my script could use a basic implementation in XP anyway, so whatever.
 
Let me throw in that after I tested this on Glitch's request, I found a really weird behaviour of the character sometimes not doing anything when you click the chest... aka not opening it, not walking towards it, ... not sure what's causing this because it doesn't really make that much sense... but if I should figure it out, I'll communicate it ;)
 
I have a completely working version of all the things you need in my script archive from rmxp. Made by Cybersam, near, and mr.mo. it works amazingly, the only down side it is sdk dependent, let me know if you want it.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top