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
43
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,713
Reaction score
2,830
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,713
Reaction score
2,830
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,713
Reaction score
2,830
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 Profile Posts

how does everybody even finish anything

i have like 5 projects in the backburner and it's just so sad that i probably won't get to finish all or maybe even any of them
Did you know that 90% of people in the world use the number in their sentence as they see fit?
It's been a long time since I was here but I have a lot of updates... btw I am teaching again about game programming and game design in some schools here in Brazil hahahaha It's good to see kids and teens learning this kind of thing!
welp, I literally can't continue working on ALEX now that my MZ trial is up (unless I somehow place in the jam which I don't remotely deserve to for my unfinished crap) so I am back on my bullshit

Forum statistics

Threads
113,891
Messages
1,078,233
Members
147,982
Latest member
GoyaGames
Top