Shadowfiend

Villager
Member
Joined
Jul 15, 2012
Messages
13
Reaction score
0
First Language
English
Primarily Uses
I feel really stupid for asking this, since I can't find the answer anywhere, but what exactly do you do for this script. I have it in the Material thing, but I don't know what to put in for the Script event. I am completely new to Scripts and trying to learn how to use them, so please have patients if your going to help me. Thank you.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,859
First Language
English
I feel really stupid for asking this, since I can't find the answer anywhere, but what exactly do you do for this script. I have it in the Material thing, but I don't know what to put in for the Script event. I am completely new to Scripts and trying to learn how to use them, so please have patients if your going to help me. Thank you.
I'm assuming that because it's a pathfinding script, you just make those script calls (eg: event script call) under the instructions and it will automatically find a path to that specified coordinates.
 

Shadowfiend

Villager
Member
Joined
Jul 15, 2012
Messages
13
Reaction score
0
First Language
English
Primarily Uses
If the Event location for the Script is (014,019) and (001,001) is where I want the Event at (014,019) and my character (015,020) to go, what would I put in the Script box under the Event things? I am sorry, but I still don't know what a Script call is, is it were the Event that is using the Script is?

Edit: I also forgot to mention, just in case it matters, but (001,001) is at a Transfer Point.
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,859
First Language
English
Script call = "Script..." event command

Just have your event make the call



Code:
$game_player.find_path(15, 20)
And your player should move to (15, 20) automatically.
 

Shadowfiend

Villager
Member
Joined
Jul 15, 2012
Messages
13
Reaction score
0
First Language
English
Primarily Uses
Thanks, I'll test it out.

Edit: It works!! Thank You So Much!! Now only thing left is to find out why it won't transfer since the location I want the character to go to is a Transfer point (like I said before) but that could be solved with something like when the character reaches the point it will auto transfer from the event with the Script in it. Also how do I get the event it's self to move using the same Script?
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,859
First Language
English
1: set move route

2: "this event"

3: call script: find_path(x, y)

Edit: It works!! Thank You So Much!! Now only thing left is to find out why it won't transfer since the location I want the character to go to is a Transfer point
Player touch?
 
Last edited by a moderator:

Shadowfiend

Villager
Member
Joined
Jul 15, 2012
Messages
13
Reaction score
0
First Language
English
Primarily Uses
I just did the Quick Transfer option, so I think it is player touch, but my Character would just keep walking over it, also is there a way to prevent the game its self from going slow, or is that normal? Also, I got the event to move, but it is slower than the Character, is there a way to fix that?

I'll keep working on it right now, in case I find something that works (that I know how to use).

Edit: Alright the Event speed is no longer an issue, but since the Character goes up stairs and it looks like this almost.

|_| And the _ is one tile, when the Event goes up the stairs, the Character waits until the stairs are completely open to continue from

|_| where he left off at.

|_|

Edit: Ok, so the game speed seems to go good and bad and when it is bad then the staircase issue occurs. Also, the Event stops 2 tiles in front of the transfer point, I tried to change the location of the Script path's end point, but the Event still stops.

Edit: Never mind I got it all to work, Thank You So Much!!!! Also I appreciate it that you were able to help me.
 
Last edited by a moderator:

BMoz

Veteran
Veteran
Joined
Aug 24, 2012
Messages
37
Reaction score
3
First Language
English
Primarily Uses
Is there a way to use variables to get the event to go to somewhere that might change? Like if I wanted it to chase the player?
 
Last edited by a moderator:

- Aërendyll -

Noodle arms
Veteran
Joined
Mar 26, 2012
Messages
63
Reaction score
29
First Language
Dutch / Aenese
Primarily Uses
Is there a way to use variables to get the event to go to somewhere that might change? Like if I wanted it to chase the player?
I'd like to know this as well, since I want to make events chase the player around obstacles like walls and tables. Is this possible using this script?
 

VideoWizard

Dragon Kingdoms Series producer
Veteran
Joined
Mar 13, 2012
Messages
511
Reaction score
418
First Language
English
I suppose you can set X and Y equal to the player's X and Y with two variables, and have it change when the player moves.

Set variable 21 to the player's X coordinate, and variable 22 to the player's Y coordinate. (or any two numbers, those are just an example)

I'm not certain the snippet below works, but it should be this general idea.

$game_player.find_path($game_variables[21], $game_variables[22])
 

Oriceles

Veteran
Veteran
Joined
Apr 4, 2012
Messages
384
Reaction score
71
First Language
English
Primarily Uses
N/A
Event Script Call: self.event.find_path(x, y)Event Movement Script Call: self.find_path(x, y)What is the difference between those two?, I want to use this with an autorun to move another event in a cutscene and I haven't figured out how :(
 
Last edited by a moderator:

PK8

I sense there's something in the wind...
Veteran
Joined
Mar 17, 2012
Messages
1,220
Reaction score
152
Primarily Uses
Wow, what a necropost I'm performing here but:

You would perform the first call through an Event Command. The other would be through a Move Route.
 

Latest Threads

Latest Profile Posts

Today we be doing an unscheduled stream! Lets get some work done on the titlescreen for Lightestone! <3
www.twitch.tv/riazey
I can't believe it... my mom is going to sign me up for the Planet Fitness down the street! I need to lower my cholesterol according to my doctor, and I'll need to lose some weight to fit into Helen Henny's skirt (I ordered a skirt for my mascot outfit and realized it was a bit too small). My doctor says I need to lose weight anyway.
I blame my lilest bro for the duck suit. Sketched it and realized it had to be added to a mock fashion magazine cover. The titles are actually inside jokes about the place this NPC is from.
EvKECQJVEAw3Qux
Kes
After a few hectic months, my hiatus is over, and I'm now back. Good to see so many familiar names posting. And a forum update while I was away.
V1.3 of Demo, a new concept artist on the team, character voices are coming into light more... I'm happy to say that the fangame is making good progress.

Forum statistics

Threads
108,855
Messages
1,040,095
Members
141,300
Latest member
Torcham
Top