Mabus

Warper
Member
Joined
Dec 2, 2021
Messages
4
Reaction score
1
First Language
english
Primarily Uses
N/A
Made a quest with Character level as a variable and it didnt work. to troubleshoot i made an npc with the text script
"your level is \v[2] (2 is the variable number) and it says zero, even after manually setting the starting lv to 3.
any advice?
edit: i even made an NPC that just gives me levels, and the value still shows up as zero.
1638407440115.png
 
Last edited:

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
45,511
Reaction score
16,413
First Language
English
Primarily Uses
RMMV
Is the character in your party? Please show the full event, so we can see both the variable being set, and the variable being used.


What are you using for the quest - a plugin? Please add a link to that as well (though I doubt it's anything to do with the plugin)


edit ... you can't have an event page conditioned by a variable being a certain amount, unless you have SET the variable somewhere else first. If the character's level is less than 3, this page won't even be active, so the Control Variables command right at the end will never be run, and the character's level will never be put into the variable.
 
Last edited:

VegaKotes

Veteran
Veteran
Joined
Jun 25, 2013
Messages
212
Reaction score
155
First Language
English
Primarily Uses
RMMV
Where are you setting this variable to Clevel's level? Is it in another event? A parallel process? It's not inside of the event that already requires the variable to be 3 or higher is it?
 

Mabus

Warper
Member
Joined
Dec 2, 2021
Messages
4
Reaction score
1
First Language
english
Primarily Uses
N/A
Is the character in your party? Please show the full event, so we can see both the variable being set, and the variable being used.


What are you using for the quest - a plugin? Please add a link to that as well (though I doubt it's anything to do with the plugin)


edit ... you can't have an event page conditioned by a variable being a certain amount, unless you have SET the variable somewhere else first. If the character's level is less than 3, this page won't even be active, so the Control Variables command right at the end will never be run, and the character's level will never be put into the variable.
I havent started playing around with plugins yet, i just got into this a couple days ago.
Yeah, the character is currently the only party member. im sure it is something simple.
 

Attachments

  • Capture.PNG
    Capture.PNG
    203.1 KB · Views: 4

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
45,511
Reaction score
16,413
First Language
English
Primarily Uses
RMMV
Is this the only place you are setting that variable? It won't work, as I explained in my edit. You can't have an event page conditioned by a variable, if the variable has not already been set somewhere else.
 

Mabus

Warper
Member
Joined
Dec 2, 2021
Messages
4
Reaction score
1
First Language
english
Primarily Uses
N/A
Where are you setting this variable to Clevel's level? Is it in another event? A parallel process? It's not inside of the event that already requires the variable to be 3 or higher is it?
you lost me, im new and kinda dumb. this is a snip of the event page.
Criticism welcome.
 

Attachments

  • Capture.PNG
    Capture.PNG
    203.1 KB · Views: 2

VegaKotes

Veteran
Veteran
Joined
Jun 25, 2013
Messages
212
Reaction score
155
First Language
English
Primarily Uses
RMMV
Okay so like Shaz said. The conditional variable on that event will prevent that page from showing up unless the Variable Clevel is equal to 3 or more.

Which means that unless the variable is 3 or greater *NOTHING* on that event page will happen. Not even the very top item which is setting the variable to Clevel's level.

So if you need to have the variable checking Clevel's level before the player tries to interact with that event page you need to use another event to set the variable to Clevel's level.

Either an autorun event or a parallel event or a common event, an old lady player touch based event, literally anything that will update the variable to Clevel's current level *before* they can interact with this event.
 

Mabus

Warper
Member
Joined
Dec 2, 2021
Messages
4
Reaction score
1
First Language
english
Primarily Uses
N/A
appreciated guys. Follow up question. what would the command to update current level look like?
Id rather not just overwrite it to set @ lv 3, and im at a loss how i can pull this of smoothly.

Edit: i figured it out, in case anyone ever has the same problem i just added a random level variable to a already existed npc that becomes a party member. just made the party member required.
you guys are great.
 

Attachments

  • Capture.PNG
    Capture.PNG
    766.7 KB · Views: 3
Last edited:

VegaKotes

Veteran
Veteran
Joined
Jun 25, 2013
Messages
212
Reaction score
155
First Language
English
Primarily Uses
RMMV
So one of the things you can do is set a parallel process inside of the Common Events tab.
First you have to activate a switch somehow. Autorun event that erases itself, switch that player clicks to advance, Old lady who runs into the player and then explodes...whatever. I usually name such a switch "BG Checker" because it "checks" things in the "back ground."

In the Common Events tab I have a common event that is set to activate as a Parallel Process whenever "BG Checker" switch is turned on.
And then inside of that Common Event you can simply set "Variable Clevel to Actor Clevel's level."
And it will continuously check it, updating to the new value whenever Clevel's level changes.

Other options include simply setting the variable to the Actor's current level before any interaction that requires it if you don't want too many parallel processes going on at once.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
45,511
Reaction score
16,413
First Language
English
Primarily Uses
RMMV
I don't think your approach is going to work. What if the player is only level 2 when they speak to that NPC and they join the party? What if the player is level 5 and they haven't spoken to that NPC yet?

You can't say "set this variable to that actor's level", then assume the variable will automatically change whenever that actor's level changes. The variable will contain the actor's level at the time you run the Control Variables command, and will not change again unless you tell it to.

I would also not use a common event. I would simply check what the level is, on the event that needs the actor to be a certain level. Which means don't use it as a page condition.


Perhaps you should explain what you're trying to achieve, from the player's point of view, and then we can tell you how to do it.
 

Latest Threads

Latest Profile Posts

I was surprised to see a email from Safeway that my grocery have been delivered when they have not. The email was a noreply message. So enjoy the $88 of free food random person.
Well friends, I'm happy to announce that I've officially completed 1 plugin and am running compatability tests and writing the documentation for the second tomorrow morning!
Vegan post. Pic of a pig in a suit and tie like he is laying in a coffin but it's a sandwich. 'One meal soon forgotten, in exchange for a whole life." Really don't think rolling around in poop your whole life would be so valuable.
Guys, Tutorials is for posting tutorials you have written, not for asking for help. Use the Support forums for that please.
Trailer is almost done for the game i can't wait to show it to everyone

Forum statistics

Threads
129,862
Messages
1,205,780
Members
171,040
Latest member
babeby_s
Top