How to make a event to check player level?

ZetlasX3

Veteran
Veteran
Joined
Mar 15, 2015
Messages
71
Reaction score
3
First Language
Danish
Primarily Uses
RMMV
I have searched around and found some but not for MV.
What I want is a event to run in all my Wildlife zones on enemies like Hornet and mices.

What it shall do?
Because I wanna make a game without auto battles when you hit the grass (Pokemon) I want to use and make something out of its Trainer system instead. That means all my enemies is showed up in the map like if there is a zone where you can fight a Hornet, that Hornet will be a event.

Okay but now to the question. I want my Wildlife mobs like the same Hornet as before, to check for the players lvl. in a Conitional Branch here it have to look it up like:

If we say I start a new game and enter a zone with Hornets, they will move towerd me because they are really aggrasive. but they do not just go in fight blind. If the player's level is equel to 5 or higher (Yeap its a low lvl zone) the Hornet will now flee from you

Can anybody help me understand how to make this setup
 

Cootadude

Noob with exp
Veteran
Joined
May 3, 2019
Messages
58
Reaction score
42
First Language
English
Primarily Uses
RMMV
You can set a variable before the conditional branch that checks any actors lvl by...
1. click on Control Variables
2. Select Game Data then click on it.
3. Select Actor
4. Then you can choose to check what Actor and for what. (It check the Level on default.)
sulotion.png
Hope you find this useful and if you have questions let me know and I will give more details.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
3,707
Reaction score
2,807
First Language
English
Primarily Uses
RMMZ
If you want to use the highest level of your party members, you can do a "script" setting for variable and put

$gameParty.highestLevel()

If you want it to look at the average instead, do

const party = $gameParty.members(); party.reduce((acc, member) => acc + member.level, 0) / party.length
 

ZetlasX3

Veteran
Veteran
Joined
Mar 15, 2015
Messages
71
Reaction score
3
First Language
Danish
Primarily Uses
RMMV
Okay I tried what you told me. I dont know if this is the smartest way to do it. But if I understand what I have done right.

I add 2 variable controlls for lvl. one for Garrthul, and one for Elvira.

Then I add a Conditional Branch to check for i player lvl is equel to 3 or higher. it will move towerd to me else it will flee. But it seems to if im lvl 3 it still just move towerd me and does not stop when im higher then lvl 3 eather.

Player attractive.png

What am i doing wrong?
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
3,707
Reaction score
2,807
First Language
English
Primarily Uses
RMMZ
You're using the same variable for both characters, so the second one is "overwriting" the first. That means it's never looking at Garrthul's level at all.

Check my post and you'll see the scripts to use for both the highest level in the party and the average party level, since it isn't clear which you intend to be using.
 

ZetlasX3

Veteran
Veteran
Joined
Mar 15, 2015
Messages
71
Reaction score
3
First Language
Danish
Primarily Uses
RMMV
hey again. I want to use the script for highest player just so I dont skip to Elvira and she then gonna fight them bacuase Garrthul will still be in the party.

Okay so what I have tried still dont get it to work Player attractive.png

Can you help me find the problem. Btw sorry im new to RPG Maker.
 

ZetlasX3

Veteran
Veteran
Joined
Mar 15, 2015
Messages
71
Reaction score
3
First Language
Danish
Primarily Uses
RMMV
You're using the same variable for both characters, so the second one is "overwriting" the first. That means it's never looking at Garrthul's level at all.

Check my post and you'll see the scripts to use for both the highest level in the party and the average party level, since it isn't clear which you intend to be using.
Okay I tried to add < 3 to your script and now it works.
Thank you. Now I just need the next part. A event on the same hornet where it detects for player within 5 sqeres of it before this event trickers else it will just fly around
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
3,707
Reaction score
2,807
First Language
English
Primarily Uses
RMMZ
If you have access to Yanfly's plugins, there's one that provides a notetag for this.
 

ZetlasX3

Veteran
Veteran
Joined
Mar 15, 2015
Messages
71
Reaction score
3
First Language
Danish
Primarily Uses
RMMV
Hmm I dont have access to that pack sadly. But I have nearly done it. Now it goes to be but it will not enter a battle when it collide with my actor BEFORE ENTERING A BATTLE.png
I have tried to figure out where I find the problem and it seems its because it never exit the Set Movement route. I have tried to disable "Wait for Completion" but then it just move a step and enter battle and thats not the point of it.
 

Latest Threads

Latest Posts

Latest Profile Posts

Exploding Fruits and Rasaks Pixelfarm Assets | RPG Maker News #108

So ghosts can go through walls and stuff, and depending their type (according to fantasy media) they can or can't interact with objects to a certain degree...

So why they don't always fall through floors? Do they always float and sometimes simulate walking? If things go through them how can they hear/see? And why sometimes they have clothing? Do clothes die as well?
my birthday was yesterday...
i feel closer 2 being able 2 get a discount on the kids menu than i do being able to buy booze1627428008986.png
Getting to play your RM game on Steam Deck? How cool is that?
The best among us don't set out to be heroes. They don't want that job. They just set out to do the things nobody else wants to do. Because... someone has to do it.

Forum statistics

Threads
113,704
Messages
1,076,771
Members
147,725
Latest member
Frabeechio72
Top