Help - Search - Members - Calendar
Full Version: Event walks to location?
RPG RPG Revolution Forums > Scripting > Event Emporium
sasofrass
How would you make it so you can have an event walk around but when you want to have it walk to a specified location?

Ale Goth
That is impossible...but, I have a complicated way of doing it. And i'll tell you anyway. Whatever gets the job done.

Ex: (Why it won't work?)
Event_001 is a male. He walks randomly around the bar. Now that is made with the the "Autonomous Movement" on the bottom left of the event when editing it. You have the random movement set aside. Now for the movement to specific location...lets see, looks through the move commands. Nope nothing to go towards a specific x,y coordinate. It's not going to happen that way.

Ex2: (Why it will work?)
Event_045 is a male. He walks around his house randomly. Now you repeat the autonomous movement and...anyway yeah thats done. Now for the movement to specific location...lets see, oh look! Move toward player command. But wait? What if I dont want them to move towards me. Well...here is the complicated part. And pertains to a lot of mishap leading to crap. Like I said, i'll tell anyway.

Note: This will only work for cutscenes/where the player isn't able to move during this.
1.Have an invisible event with 2 pages.
2.1st page is blank, second page will have your players graphic.
3.2nd page will have a switch called Move_set
4.What the crap...I, will have to give you the demo instead of these steps..

sleep.gif
Look it over, and I will explain anything you need to know if its too confusing.
When you look at it youll see that he walks through the desk...I sem to discovered the stupidy of move toward player as he walk into the desk and stopped moving.
Demo Here<<<
I really have no clue why I tried to solve this. But, if you like it. Then yay biggrin.gif Enjoy.
sasofrass
QUOTE (Ale Goth @ Dec 30 2010, 02:04 AM) *
That is impossible


Indeed it is not. tongue.gif

I have figured out how to make them walk with a lot of variable locations and conditional branches. It is quite a bit of work just to get an event to move to a certain location.. >_>

I was hoping there is an easier way, even with scripts maybe.
Ale Goth
Oh? Did you just stop reading right when I put impossible in the first line lol?
Because theres a demo the way I did it. I read how you though of a different way...and then bam in my head I think I know how you did it your own way.
Check x,y then check x2,y2 of destination and if x is > than x2 it would move left/right and repeat until reaching the desired x location. Rpeat for y in the direction of up and down. Would that happen to be the way you did it...because that way seems to be much easier than the one I posted in response haha.
sasofrass
QUOTE (Ale Goth @ Dec 30 2010, 01:29 PM) *
Oh? Did you just stop reading right when I put impossible in the first line lol?


kinda tongue.gif but i still read it

QUOTE (Ale Goth @ Dec 30 2010, 01:29 PM) *
Check x,y then check x2,y2 of destination and if x is > than x2 it would move left/right and repeat until reaching the desired x location. Rpeat for y in the direction of up and down. Would that happen to be the way you did it...because that way seems to be much easier than the one I posted in response haha.


Exactly how I did it. I use BlizzABS and when I design my boss fights I want the boss to walk to the center of the room, and when you're fighting him he can get moved all over the place. Having him teleport to the center of the room every time gets lame sad.gif

----------------------------

I went to open your file and Norton stopped me from doing it :\ couldn't get to see it. Maybe just put it all into a folder and zip it instead of compressing it?
Ale Goth
Oh wow, exactly like it.
Anyway, here is a zipped folder of the demo in case you still want to look at it.

Zipped Demo-Loc
Zinx10
Kind of what Ale Goth said, another way is where the person keeps getting closer and closer to the X and Y coordinates.
Check if X1 is equal to X2. If not, check if X1 is greater than X2, if not, person goes right, and vise versa. Then you can either do the risky method by keep on going until X matches, but have a wall problem, or do a tactic, where you do X then Y, then X, then Y, and so forth. Imagine kind of like the slope equation.

X2-X1
--------
Y2-Y1

Except, separate them, so no division. So if X2-X1 is a positive, the go right. If negative, go left. If Y2-Y1 is positive, go down (I believe), if negative, go up. Understand? Loops can help this situation. I hope I helped.
sasofrass
Made a demo: http://www.rpgrevolution.com/forums/index....showtopic=47480
Zinx10
Did you ask us that, just so you could make one of those? Well, okay. biggrin.gif
sasofrass
QUOTE (Zinx_therpgmaker @ Jan 3 2011, 05:06 AM) *
Did you ask us that, just so you could make one of those? Well, okay. biggrin.gif


lol no i really wanted to see if there was an easier way to do it

gave me something to upload, aswell wink.gif
Zinx10
Okay.
wink.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.