BeebBerrys

Warper
Member
Joined
Apr 26, 2021
Messages
3
Reaction score
1
First Language
English
Primarily Uses
RMMV
I tried everything that i could think of but I can't figure out how to do this.. ╮( ̄ω ̄; )╭
The idea is that the player has to give a specific item to a character and if they don't choose the right one, the character gets angry and they can choose another item. Just like a murder mystery kind of game!
o(〒﹏〒)o I hope this makes sense because I need to figure this out since this is the core aspect of my game.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
36,679
Reaction score
9,857
First Language
German
Primarily Uses
RMMV
use the select item command to get the ID of the selected item into a variable, followed by a conditional branch to check if the item selected was the correct one or not.
 
Joined
May 9, 2022
Messages
7
Reaction score
1
First Language
English
Primarily Uses
Other
Andar's answer is exactly how it's done. If you look in past threads, people have this problem quite a lot. The engine is versatile enough that I think the 'select item' feature should work, even as a core element to your game. It might just take a lot of manual work depending if you want the event to do something for a lot of items.

When you use Select Item as a line of code, you'll get "Variable" and "Item Type" and what that variable number corresponds to is ID # in your items list (maybe that solves the problem right there). (Say Item 42 is a black potion, the game's going to check what item you select, but strictly in relationship to whether it's higher, lower or equal to the black potion). Following this event line you want to add a conditional branch which references the variable you selected above (say it's 42, the game's going to look for item 42 AND variable 42). In the same conditional branch, you just create your if statements now. (If item 42 or lower is selected, do this; if item 42 and above is selected, do this; if item 42 is not selected do this.) You just get creative at that point.

Select Item operates a bit differently than the other event functions, but you'll get used to it, especially if you're using plugins which also reference event #s or item #s.
 
Last edited:

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
4,930
Reaction score
3,131
First Language
English
Primarily Uses
RMMV
And if you want the player to be able to keep choosing items until they get the right one (or the NPC gets angry enough), you can put it in a loop.
 

Latest Threads

Latest Posts

Latest Profile Posts

senary_concept_art.png
The concept art for the sprite of Senary, a major character in my upcoming (as-of-yet-unnamed) project. She is known as the Timelord because she can "stop time" by making eye contact with a person; Paralyzing them for a short period of time through a type of hypnosis. Tell me what you think about her. I'm thinking of changing the color of her coat.

Forum statistics

Threads
124,367
Messages
1,163,100
Members
163,164
Latest member
mfexplorer
Top