Charas-Project

Game Creation => RPG Maker => Topic started by: zuhane on July 10, 2012, 02:58:44 PM

Title: Tracking character coordinates.
Post by: zuhane on July 10, 2012, 02:58:44 PM
Does anyone know if it's possible to obtain coordinates in RPG Maker 2003 which are taken from the position of an event?

So, for example, say I have a guy stood somewhere, is there a command which can grab his X and Y values so I can check those
values for collision against something else? Cheers in advance!

EDIT: Scratch that! Figured it out, it's in variable operations and it lets you grab event coordinates. However, I'm trying to get collisions
to work with the variable of different objects, but does it only regard where the exact pixels collide, or does it count the entire sprite size?
Title: Re: Tracking character coordinates.
Post by: drenrin2120 on July 10, 2012, 03:21:03 PM
Um... Zuhane... You didn't... I mean, nevermind. =P
Title: Re: Tracking character coordinates.
Post by: Meiscool on July 10, 2012, 03:51:45 PM
It counts the 16 x 16 square that the sprite is standing on. The sprite can be completely blank (no pixels) and it will still calculate a collision.
Title: Re: Tracking character coordinates.
Post by: zuhane on July 10, 2012, 04:10:11 PM
I've actually fixed this problem now! Ahhh, it's nice being able to program using logic and not
trial and error for once. I've made a crosshair using the DynRPG keyboard/mouse mod, and it reacts to targets. Now for some fun
with particles. Expect to see some screenies soon! A mod can close this thread if they want.

EDIT: Actually, I've hit a NEW problem! Does anyone know how to completely disable upwards movement? I'm trying to recreate some
platforming action, and we can't have him walking around wherever the hell he wants!
Title: Re: Tracking character coordinates.
Post by: Prpl_Mage on July 10, 2012, 09:01:03 PM
Add a layer of transparent  "upper layer" with no passability above where the hero is.

OR

change all tilesets to prevent upward movement under direction.
Title: Re: Tracking character coordinates.
Post by: zuhane on July 11, 2012, 02:42:18 PM
I like your second option. I don't want to make invisible barriers, because I still need events to be able to move around above the hero.

EDIT: The problem with this now is that other events are unable to move up and down freely through the chipset!
Title: Re: Tracking character coordinates.
Post by: Meiscool on July 11, 2012, 05:42:59 PM
I just tried making a common event that prevents action of the up key. It works, but only if you don't push multiple arrows at once. Since any player probably would, a common event that disables up is out of the question.

Have you considered making a map event that constantly teleports to the location -1 y above the player? This will completely prevent the player from moving up if set to their level, will allow events to move under/above it, and still allows the player to use the jump move command. I just tested it and it works perfectly.
Title: Re: Tracking character coordinates.
Post by: Prpl_Mage on July 11, 2012, 05:56:32 PM
But making the blocking invisibile barriers and then get the enemies and projectiles to be phasing it's pretty much solved. That or make all enemies "above hero".

I was talking about actual tiles and not events that was transparent, you got that right?
Title: Re: Tracking character coordinates.
Post by: drenrin2120 on July 11, 2012, 06:09:35 PM
Couldn't you simply create an auto or parallel event that waits for player key input and script in every action possible through conditionals? Of course, the auto event would disable other events. But parallels would allow you to handle multiple key inputs. And there are ways of creating auto-scroll quite simply in rpg maker which would allow the player to hold down a button to move the character across the map.

annnnd, after reading mic's full post, I realize his idea is much more solid than mine.

EDIT: For decent platformer-esque movement, a combo of me and mic's idea would probably be best. Mic's idea solves the up problem, and with conditionals you can create more complex movement, maybe even a picture sprite instead of a charaset. You might be able to take it a step farther and have barrier blocks constantly teleport to +/- 1 x and +/- 1 y of the hero.
Title: Re: Tracking character coordinates.
Post by: Prpl_Mage on July 11, 2012, 08:33:40 PM
I would simply use game maker if I wanted to make a platformer though since it's very much more easily done.
Title: Re: Tracking character coordinates.
Post by: Meiscool on July 11, 2012, 10:26:57 PM
^ Ditto
Title: Re: Tracking character coordinates.
Post by: zuhane on July 12, 2012, 01:28:05 AM
I would if I knew how to use it, but it just makes more sense for me to use this because I'm accustomed to it! I think I've cracked this problem anyway.
Title: Re: Tracking character coordinates.
Post by: ellie-is on July 12, 2012, 04:41:42 AM
Okay, looks like I'm not needed here.

Time to save the day somewhere else!