StrawberryFlower

The Talking Fruit
Veteran
Joined
Nov 23, 2012
Messages
1,782
Reaction score
580
First Language
English
Primarily Uses
RMMV
When trying to event a race between the player and a couple of NPCs, I noticed that either the events go WAY faster then you, WAY slower than you, or the same speed. Which means you either have no chance, it's too easy, or it's a tie!

How can I make it more... unpredictable?

Controlling event speeds? Player speed-up with buttons? Timed buttons?

(also, would top-down or side-view better better?)

Thanks!
 

HexMozart88

The Master of Random Garbage
Veteran
Joined
May 15, 2016
Messages
2,048
Reaction score
3,705
First Language
English
Primarily Uses
RMVXA
At first, when you said race, I thought you meant as in elves, orcs, etc. XD
But anyway, if you want to make the NPC's remain at one constant speed, I'd put a conditional branch with a random variable on it. For each value of the variable, it turns on a self switch activates a page each with a different speed in its condition page.
If you want it so that the event is constantly changing speed, which I assume is what you want, put a random variable, and change the speed via move route instead. Have a wait command after all of that so that the event is not changing speed 60 times per second.
 

ts50

Veteran
Veteran
Joined
Nov 10, 2016
Messages
2,178
Reaction score
4,289
First Language
English, French
Primarily Uses
RMVXA
At first, when you said race, I thought you meant as in elves, orcs, etc. XD
Ha ha, I did as well! :guffaw:
But anyway, if you want to make the NPC's remain at one constant speed, I'd put a conditional branch with a random variable on it. For each value of the variable, it turns on a self switch activates a page each with a different speed in its condition page.
If you want it so that the event is constantly changing speed, which I assume is what you want, put a random variable, and change the speed via move route instead. Have a wait command after all of that so that the event is not changing speed 60 times per second.
That will cause lag but it seems to me to be the only way to do it.
 

StrawberryFlower

The Talking Fruit
Veteran
Joined
Nov 23, 2012
Messages
1,782
Reaction score
580
First Language
English
Primarily Uses
RMMV
Well, it worked but uh. Yeah the lag. I planned on obstacles, though I'm not sure if they would make enough difference to nix the speed factor.
 

Frogboy

I'm not weak to fire
Veteran
Joined
Apr 19, 2016
Messages
1,834
Reaction score
2,343
First Language
English
Primarily Uses
RMMZ
At first, when you said race, I thought you meant as in elves, orcs, etc. XD

Ditto. I was going to tell you about a new plugin I've been working on. Lol!
 

msazako

"Lie of msazako"
Veteran
Joined
Dec 27, 2014
Messages
70
Reaction score
207
First Language
Japanese
Primarily Uses
RMMV
This is kind of hard given the fact that I'm assuming you're using MV's default movement and not using any plugins to mitigate that limitation. That said, I can tell you that I easily achieved a racing minigame since I'm using Quasi's movement, speedmanager, and a stamina plugin to increase the intensity of the minigame and make it a bit more challenging/exciting, all while giving the npc a set command for his speed/path/etc... without the usage of variables/switches.

(Also, yes, I'm using the NPC as a parallel process.)

The basis of the minigame is to beat the NPC before it reaches the lap 3 times, leaving you plenty of room to modify anything as a developer. It's pretty simple.

I think the easiest way for you to do this with multiple NPC's without lag is to have everything pre-determined and not involve as much switches as possible, then design more levels of difficulty for the next race, which allows more room for customization. On the example below, I had the NPC change speeds at some points, giving the illusion of randomization. This is because you, as a player, will be focusing more on managing your stamina rather than the opponent's progress.


EDIT: I need to add that the whole area is a separate map built just for that one minigame. So, when i said "by making multiple difficulties", I meant, copy/pasting the maps so you won't have to deal with switches. This will increase the game's file-size, but it will reduce as much lag as possible. It's kind of a compromise, really.

Let me know if you need further help.
 
Last edited:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
33,692
Reaction score
8,495
First Language
German
Primarily Uses
RMMV
Have you tried experimenting with frequency?

Speed determines how fast an event moves, frequency is how often.
Giving the event a higher speed but lower frequency than the player should do what you want, especially if you disable dash. It' a bit of experimentation however...
 

StrawberryFlower

The Talking Fruit
Veteran
Joined
Nov 23, 2012
Messages
1,782
Reaction score
580
First Language
English
Primarily Uses
RMMV
@msazako - That's genius! Do you have any ideas on how I could event such a thing?

@Andar - Well, using speed and frequency... Frequency makes them go at a... weird pace. Like stop, then go.

Thanks for the tips!
 

msazako

"Lie of msazako"
Veteran
Joined
Dec 27, 2014
Messages
70
Reaction score
207
First Language
Japanese
Primarily Uses
RMMV
I made a demo to save you some time. Just gonna have to remind you though that you will need Yanfly's Move Route Core so you can use the note tag <Always Update Movement> for your events in order for this minigame to work properly.

Good Luck!
 

Latest Threads

Latest Profile Posts

Sneak peak of my upcoming update! Who's holding her, you may ask? Find out tonight!
10.PNG
BCj
Finished another GUI! Turn indicator wasn't made by me.

ff981f8dc50b03cf58038c644334b454.jpg


3cb092fdc00087acfa0a190fd891f0ed.jpg
Added a small refining scene to my game.

It makes sense that you try to focus on the squishy mages at the back of the party first, right? If the mage can out-DPS the enemy DPS before the latter can kill the tank in front, the fight becomes boring.

Forum statistics

Threads
115,236
Messages
1,088,284
Members
149,832
Latest member
gabrieuuu
Top