[SCRIPTING] [RMVX ACE] NEED HELP WITH USING SCRIPT IN CONDITIONAL BRANCH

Posts

Pages: 1
Hello. I've been trying to look around the internet to find something that would help me sort this out, but nothing has come up, so I've been forced to make an account and bring it up to the community myself.

I am using Jet10985's Mouse System for my rpg. I would like to make it so that I am able to detect if the mouse is hovering over a specific tile or set of tiles. Jet has provided a line in his script that allows for something like this. Here's exactly what it says:
"Mouse.area?(x, y, width, height) will check if the mouse is inside the given
rectangle, on-screen. This does not account for a scrolled map."

My plan was to create a conditional branch in a parallel process event that has this mouse.area? script on it, and if it returns true, turn a specific switch on, and if false, turn the switch off.
However, I am no good with Ruby at all, so I don't know what exactly to write into the conditional branch's script box. I tried just pasting the mouse.area line into it, and then set the given rectangle to the entire screen just to see if it works, and it doesn't.

http://imgur.com/a/Y9LKG
Here is what my event looks like. Can anyone please help? A lot of core aspects of my game will not work without this feature.
Marrend
Guardian of the Description Thread
21781
The image in question:


Anyway, my thought is that the function "Mouse.area?(0, 0, 17, 13)" would return true if the mouse cursor is at the coordinates of (0, 0)? I could be mis-reading things.

*Edit: Is the dimensions of the rectangle expressed in pixels, or in tiles? There is a huge difference here, though, I can understand the natural assumption of being expressed in tiles.
Thank you for replying.
Yes, it turns out that the coordinates are for pixels instead of tiles. Rather than testing for the whole screen, I was actually testing for an area smaller than the actual cursor.
After changing the values, the event runs perfectly, so it wasn't a problem with the syntax at all.
Pages: 1