Dinamic Creates

Project Stealth | Project Dungeon Trios
Veteran
Joined
Nov 27, 2014
Messages
69
Reaction score
25
First Language
Spanish
Primarily Uses
RMMV
Hello everyone, I'm wondering, how are we supposed to use the move route script calls?
It seems I have to create a moveRoute variable/object and then send it through a character (event, player) function, but I have no idea on how to define this variable. I can't find anything related to a "moveRoute" type definition or something like that.

The thing I'm trying to attempt is forcing a character (an event that represents an enemy) move route and use the repeat option for it to cycle eternally, I want it to be generic (this script call is actually inside a common event), so theres no way to do it with conventional eventing.


I hope I explained my issue clearly, thanks for your time.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
41,143
Reaction score
14,205
First Language
English
Primarily Uses
RMMV
What calls the common event? If it's an event that has a Common Event command in it, you can use a Move Route command and select This Event from the drop-down.

The only time you would need to script the entire move route is if you don't know in advance which event it will apply to, or if you're going to apply it to many events and don't want to set each one up individually (though you could just set up the first one then copy/paste and edit each one just to change the target/subject).
 

Dinamic Creates

Project Stealth | Project Dungeon Trios
Veteran
Joined
Nov 27, 2014
Messages
69
Reaction score
25
First Language
Spanish
Primarily Uses
RMMV
What calls the common event? If it's an event that has a Common Event command in it, you can use a Move Route command and select This Event from the drop-down.

The only time you would need to script the entire move route is if you don't know in advance which event it will apply to, or if you're going to apply it to many events and don't want to set each one up individually (though you could just set up the first one then copy/paste and edit each one just to change the target/subject).

Yeah, I have done that with other common events and it works flawlessly.. it's like... stacks?

But, this is a Button Command Event (Yanfly). When you press 'C' on the map, the player attacks from a distance to an enemy event, my script looks for an event with a specific notetag in the appropiate range, and if it finds it, then the enemy gets killed. Since I'm using the Event Chase Player plugin from Yanfly as well, there was a bug that made the dead enemies keep following you (even if they wont attack).

I fixed it by changing the way I was doing it. I'm looking for optimization and easy modification, so I don't want to include too much on each event. I had to add another page to each enemy event with a selfswitch that turns on when you kill them. It is fine since I can choose the enemy dead graphic as well.

I would like to know how to do it by script calls, and it would be nice because I can't find this anywhere on the web.
I don't really need it anymore, but if anyone can share something about move route script calls, that would be rad.

Thanks Shaz:)
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
41,143
Reaction score
14,205
First Language
English
Primarily Uses
RMMV
Create a new map with a single event. Put the move route in that event and save it. Go and look at your Mapxxx.json file and see what the move route looks like. You'll see it's an object with a number of properties, and one of those is the list of movement commands which is an array of other objects.

You can build this object yourself via script commands. Just make sure it has all the same properties as the one you created using event commands. When you're ready to apply it to an event, it's something like event.forceMoveRoute(moveRouteObject).
 

Dinamic Creates

Project Stealth | Project Dungeon Trios
Veteran
Joined
Nov 27, 2014
Messages
69
Reaction score
25
First Language
Spanish
Primarily Uses
RMMV
Wow! Having the move route definition for each event in their respective map json files makes a lot of sense, lol.
Now I will try to play with this. I can't thank you enough!

EVERYTHING you do in events is defined in the map json files for MV. You've just got to interpret all the numbers.

Yeah, I got the lines I wanted and it works like a charm ♥.

Code:
var moveRoute =
{
 "list":[{"code":0,"parameters":[]}],
 "repeat":true,
 "skippable":false,
 "wait":false
};
$gameMap.event(eventId).forceMoveRoute(moveRoute);

For future reference to anyone who finds this post, this is how to insert the "doing nothing infinite loop" move route to a event in a script call.

For any other move route, it seems the most confortable way to do it is defining it on a map like Shaz said, and getting the equivalent lines.
 
Last edited:

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
41,143
Reaction score
14,205
First Language
English
Primarily Uses
RMMV
EVERYTHING you do in events is defined in the map json files for MV. You've just got to interpret all the numbers.
 

Latest Threads

Latest Profile Posts

Ami
--- Fan Art ---

F.Mage: Phew...after finishing the Gathering Quest,i can take a break with my Phone. Let's see,what's new in the Fan Art Gallery
(3 Minutes Later,The Fan Art Of F.Healer & F.Mage Pecking Each Other Appeared)
F.Mage: (Spit The Water) WHAT THE HELL!!!
(Meanwhile)
M.Knight: (Nosebleeding) Nice Scenery!
trying to figure my way around the basic functions of Construct 3 and OH GOD MY BRAIN. I'm starting to think that developing decades of RPG Maker skills might have a downside.
I miss my VXA project, so I might be rushing for RSE. Dropping a random progress report
AeroPergold wrote on LUKElcs's profile.
Its-a me, Pergold from Gamejolt!
I added footstep sounds to our content that I posted in a previous thread. I was unable to edit the post, so if you're interested, see below.

DOWNLOAD LINK

Forum statistics

Threads
108,817
Messages
1,039,718
Members
141,268
Latest member
Verdux
Top