The RPG Maker Resource Kit

RMRK RPG Maker Creation => XP => Topic started by: Solundor on April 28, 2010, 03:07:48 AM

Title: [RESOLVED] Event to Event [xp]
Post by: Solundor on April 28, 2010, 03:07:48 AM
I got a NPC Event and he's movement is set to random, You talk to him and he says "I got it over here" Then he moves to the table
my Question is how do I move an NPC Event to another Event without knowing where the original position is
Title: Re: Event to Event [xp]
Post by: cozziekuns on April 28, 2010, 03:13:14 AM
There should be a command that says "Set Move Route". Through the use of the "Ignore" Command , you should be able to find a way to maneuver the event to the table. Another thing you could do is put the table in the corner, so it's easy to make the event move to it.
Title: Re: Event to Event [xp]
Post by: Mr_Wiggles on April 28, 2010, 03:58:35 AM
no he is talking about an event randomly moving, and then move it to a location. So the path would be different every time.  Try looking up "Path finding script" in google. you can tell the event you wish to move, and it will find its own route to your destination.
Title: Re: Event to Event [xp]
Post by: cozziekuns on April 28, 2010, 04:01:38 AM
Quote from: Mr_Wiggles on April 28, 2010, 03:58:35 AM
no he is talking about an event randomly moving, and then move it to a location. So the path would be different every time.  Try looking up "Path finding script" in google. you can tell the event you wish to move, and it will find its own route to your destination.

If you cleverly place the table (for example, in a corner) and you make clever use of the ignore command, you could probably do it. But I guess a path finding script would be better.
Title: Re: Event to Event [xp]
Post by: Mr_Wiggles on April 28, 2010, 04:49:42 AM
i see what your trying to say, yea that would work, as long as the room is empty and the npc wont get caught on any thing, including the player or other npcs.
Title: Re: Event to Event [xp]
Post by: Solundor on April 28, 2010, 05:31:41 AM
Right I found one [spoiler]http://www.hbgames.org/forums/viewtopic.php?t=55274.0[/spoiler]
I think I understand it but how do I work out the X,Y ?

Edit_________________________________________________
I just stopped the NPC from moving so thanks for the help
Title: Re: [Gave up]Event to Event [xp]
Post by: Mr_Wiggles on April 28, 2010, 06:21:41 PM
well the x and the y are the location of the destination, say the table is at (4, 10) you'd enter those numbers.

example:
Put this in a script command in an event, like where you would put the move route.

x = 4
y = 10
id = <id of event to move>
$path = A_Star_Pathfinder.new
$path.setup(Node.new(x, y), id, 1)
$path.character.stop_all_paths  
$path.calculate_path
$path.generate_path


if you wanna know what the X and Y are:
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fscreensnapr.com%2Fu%2Fuzm0bi.png&hash=8dc7b60f34251e7ee100768513143055eb2f1e4e)
                    Map Id: Name (size)                      (X, Y)

when you select a location in event layer, it will show at the bottom of the window.

Title: Re: [Gave up]Event to Event [xp]
Post by: Kidfox70 on April 28, 2010, 09:54:36 PM
Oddly enough, I've come up with something, that to my knowledge is somewhat orginal. It also does actually what you asked for:

Quotehow do I move an NPC Event to another Event without knowing where the original position is

I call it the CRM. I've been working on a Demo/Tutioral for awhile now, that has alot of stuff in it. The Main things are a Catapiller Event System and the CRM. I hope to be done with the Demo soon. But using the Script found by Solundor and explained by Mr. Wiggles should work out fine for you. I deal mainly with Events. The only thing I'd add is, you still should put in alot of thought into the map that the NCP is in, for it still could get hairy.