RMMV Switch/Variable Question

Status
Not open for further replies.

SlowMN

Villager
Member
Joined
Aug 18, 2016
Messages
21
Reaction score
0
First Language
English
Primarily Uses
Hello,


I have a question about how to make an event in which an NPC will only move if you meet a certain level requirement (in this case level 5). I have watched numerous tutorials on using switches and variables but I cannot get this one to work. All of my other switches/variables work so if someone could show me where I went wrong that would be great! Screen shots are below.

RMMV.pngRMMV1.png 
 

Dad3353

Veteran
Veteran
Joined
Mar 9, 2016
Messages
421
Reaction score
108
First Language
English
Primarily Uses
@SlowMN...


Page 2 of your Event has no conditions, and will therefore always run. Page 1 will never be activated. It's always the highest-numbered Page which will run first, if conditions (or lack of...) are met.


The solution..? Try swapping the Pages (Copy Page 1, select Page 2 and Paste a Page 3, select the now redundant Page 1 and Delete...). Page 2 will become Page 1, Page 1 become Page 2. Now, whilst the conditions are not met, Page 1 will run, but as soon as the conditions for Page 2 are met, it will run, and Page 1 will no longer be triggered.


Hope this helps.
 

SlowMN

Villager
Member
Joined
Aug 18, 2016
Messages
21
Reaction score
0
First Language
English
Primarily Uses
Thank you for the suggestion. I still cannot get it to work. The NPC looks to the left, doesn't move, and locks the character from moving. This is the same problem I was having before.


 Let me clarify so I can make sure I did this correct. I copied event page 1, went to page 2, and created a new page (page 3) with the pasted event data from page 1. I deleted event page 1 and tried to run the event. 


I appreciate the help.


SlowMN
 

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
14,307
Reaction score
7,880
First Language
English
Primarily Uses
RMMV
One thing I notice is that the page 1, as you have posted above, has a conditional switch of "002-Level", but you turn that switch on in the event page itself. That page will never run because of that.


Also, assuming that you are wanting the page 2 (as posted above) move route to happen if the player is above level 5, you can really simplify things into one page. What I would do is remove the conditions on the longer event page. In your If statement for Player Level >= 5, remove the set switch on. Also, in that put the move route you want to happen there. Then you can delete the page 2 (as you posted them above).


This is all assuming I'm understanding correctly what you are trying to accomplish. It would also be helpful to see the rest of that long event page.
 
Last edited by a moderator:

SlowMN

Villager
Member
Joined
Aug 18, 2016
Messages
21
Reaction score
0
First Language
English
Primarily Uses
One thing I notice is that the page 1, as you have posted above, has a conditional switch of "002-Level", but you turn that switch on in the event page itself. That page will never run because of that.


Also, assuming that you are wanting the page 2 (as posted above) move route to happen if the player is above level 5, you can really simplify things into one page. What I would do is remove the conditions on the longer event page. In your If statement for Player Level >= 5, remove the set switch on. Also, in that put the move route you want to happen there. Then you can delete the page 2 (as you posted them above).


This is all assuming I'm understanding correctly what you are trying to accomplish. It would also be helpful to see the rest of that long event page.


I have attached below screen shots of the entire event page. I did what you suggested I removed the condition switch and variable on the left side of the event page. I switched the level requirement to 2 so I could play test it easier. I am now getting the text to show up with the options but he will not move even when I am level 2. I have included a picture of the map as well. The idea is when I reach level 2 and talk with the NPC, he will move 1 square to the left, face my character, say "hurry...ect" and allow me to pass behind him.

rmmv2.pngrmmv3.png
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
29,541
Reaction score
6,874
First Language
German
Primarily Uses
RMMV
an event can only move on a tile if that tile is 1) passable and 2) does not contain another event.


If either condition is wrong, you need to activate "through" before the move (which also disables further triggering, but it doesn't look as if you'll need a trigger later)
 

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
14,307
Reaction score
7,880
First Language
English
Primarily Uses
RMMV
Is it showing the text that comes after the If >= 2 check?
 

SlowMN

Villager
Member
Joined
Aug 18, 2016
Messages
21
Reaction score
0
First Language
English
Primarily Uses
Is it showing the text that comes after the If >= 2 check?
Yes, but the incorrect text is showing up. It is showing the text for when the character is < lvl 2


@Andar


The tile should be passable. I have the tile to the NPC's left available to walk on and the tile behind him as a transport player tile. There is only an event tile on the same tile as the NPC. Here is a picture

rmmv4.png
 
Last edited by a moderator:

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
14,307
Reaction score
7,880
First Language
English
Primarily Uses
RMMV
Is Player Level a variable? And if so, where do you set it equal to the player's current level?


Somewhere before your If statement, you need to set a variable equal to the player's level. This can be done in the Control Variable command. Select Game Data and click the dropdown menu. This will open another box where you can select Actor, choose the actor and select Level.


I think what's happening is that because you are not setting that variable, it's reading it at a value of 0, therefore is not executing the part you want to happen.
 
Last edited by a moderator:

SlowMN

Villager
Member
Joined
Aug 18, 2016
Messages
21
Reaction score
0
First Language
English
Primarily Uses
Is Player Level a variable? And if so, where do you set it equal to the player's current level?


Somewhere before your If statement, you need to set a variable equal to the player's level. This can be done in the Control Variable command. Select Game Data and click the dropdown menu. This will open another box where you can select Actor, choose the actor and select Level.


I think what's happening is that because you are not setting that variable, it's reading it at a value of 0, therefore is not executing the part you want to happen.


Ok that makes sense. Is there another way to make a variable without using the specific actor or making a variable for player 1?


I ask this because in the beginning of the game the player is able to select a character based on a number of different questions (ie: It starts out as, are you male or female? you select one and it changes the character on screen. It then asks what class are you and will change the character again based on what you pick (to either hunter, mage, paladin, warrior). Here is a picture of what I am talking about

rmmv5.png 





Otherwise will I have to make a control variable for each character?
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
29,541
Reaction score
6,874
First Language
German
Primarily Uses
RMMV
why do you use several actors for that? simply use a single actor and change the class, the picture and whatever to fit the selection.
 

SlowMN

Villager
Member
Joined
Aug 18, 2016
Messages
21
Reaction score
0
First Language
English
Primarily Uses
why do you use several actors for that? simply use a single actor and change the class, the picture and whatever to fit the selection.


Let me clarify. In the beginning of the game, the player is able to pick all the attributes of their character. By doing this the actor will never be the same. It will range from a somewhat large selection of actor names when they are all done. My concern is that if I make a control variable, I will need to make it for every combination or if the person chooses an actor that doesn't have the control variable, then the NPC will not move for them.


Here is what I am talking about in terms of the actor generator.

rmmv5.pngrmmv6.png 




I have been testing moving the NPC after the player reaches lvl 2 with the same actor to ensure their isn't an issue with setting the variable to the wrong actor (one of the other possible combinations from the character screen in the beginning of the game).


If I can tackle getting the NPC to move at all for any of the actors, I believe I will be able to set it for the remaining. I am just having an issue right now with getting it to move once the player reaches level 2. I have made some progress in that the initial event text will show up with the 3 choices the player can make (I was sent here, I am a merchant, I am in a hurry and must go), but  am running into an issue where it will not recognize the character being level 2 and permitting them to pass. Instead it always gives them the you are not a high enough level.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
29,541
Reaction score
6,874
First Language
German
Primarily Uses
RMMV
Let me clarify. In the beginning of the game, the player is able to pick all the attributes of their character.
Yes, I understood that perfectly - my question is why are you using different actors for that?


Instead of removing and adding a member actor with the hunter class (for example), why don't you use the change class command to change the (single) actor into class hunter?


Most people use a single actor and change that actor to having the properties the player selects, because that will make the later game references a lot easier, and your way has absolutely no advantages compared to using the change <property XY> commands instead of changing the membership for predefined actors.
 

SlowMN

Villager
Member
Joined
Aug 18, 2016
Messages
21
Reaction score
0
First Language
English
Primarily Uses
Yes, I understood that perfectly - my question is why are you using different actors for that?


Instead of removing and adding a member actor with the hunter class (for example), why don't you use the change class command to change the (single) actor into class hunter?


Most people use a single actor and change that actor to having the properties the player selects, because that will make the later game references a lot easier, and your way has absolutely no advantages compared to using the change <property XY> commands instead of changing the membership for predefined actors.
Thank you for the advice. I didn't realize that was an option. I got RPG Maker MV about a week ago so I have been watching hours and hours of tutorial videos. I guess I never saw anyone doing it that way. I guess I could mess around with setting it up your suggested way. Then if I make a variable I only do it for the single actor (as in there will only be one choice correct?)
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
29,541
Reaction score
6,874
First Language
German
Primarily Uses
RMMV
@SlowMN If you're new, I suggest you follow the link to the starting point tutorial in my signature and work through the (non-video) tutorials linked there.


The problem with video tutorials is that they skip a lot, because otherway they would be too long.


Most of the tutorials in the link were originally written for Ace, but on the eventing level there is effectively no difference between VX Ace and MV - minor differences like Ace has four options in show choices and MV has six don't count for tutorials.


One of the link is a user-handbook of about 200 pages - how long would a video need to even read that, what do you think?


There are some errors in some tutorials because most are user-written and no one is perfect, but working through them should give you a lot better introduction to the RM engines.


I'm closing this as this goes too far away from the original (and solved) question, and we like to keep different questions in their own topics.
 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

My sister is a saint. Specifically Saint Peter. Because shes my best friend until other ppl are around then shes all "nope, dont know him, dont like him."
Making it a rule that I don't do any world building for my new game before the actual gameplay is concrete and working. I have 16 years of lore to work with anyway.
Cheesy power metal makes everything better. No matter what you do, you'll feel heroic doing it.
Starting to really like the first of my madness areas. I think the eyes looking at them really helps to sell the place. :LZSexcite:

Forum statistics

Threads
95,699
Messages
931,120
Members
126,044
Latest member
EuphoriaInteractive
Top