Way to call Common event based on variable?

bloodplague

Villager
Member
Joined
Jun 30, 2020
Messages
11
Reaction score
0
First Language
English
Primarily Uses
RMXP
Hi guys,

Is there a way to call a Common event based on a variable (specifically, the number of items in the player's inventory?)

This is what I have so far but I'm hitting a wall.
Ruby:
if Input.trigger?(Input::I)
  #Summon the Inventory when the 'I' button is pushed.
  $game_temp.common_event_id = @item.common_event_id
  
  return
end
I would like to call 'Common event ID 1' when the player has 1 item in their inventory, '2' at 2 items, and so on, up to five. I'd like this to be a script and not a script call, also.

Thank you.
 

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

Latest Threads

Latest Posts

Latest Profile Posts



So I figured out how to put words and pictures in the screen transition. It even wipes away from both the top and bottom. The possibilities are endless! :LZSexcite: I'm going to devise secret messages now for them because I'm a terrible wonderful person like that. :kaopride:
December has arrived and with that, an ¡update for Aletoir Feast! a game made it for the One Map Challenge. I will use some of the remaining switches, variables, and events from the challenge limit to add more content but keep it within the requirements. ¡Have a nice day Everybody!
What I worked on today. :LZSjoy:

No stream today, make a game in MZ is continuing next week!
It seems MOG Weather only has a "clear" function to instantly erase a given weather effect. Probably works well if weather only changes at map transfer, etc, but looks very abrupt if weather effects are continuously changing. So my next challenge: script a "fade" function to gradually fade the sprites and wait to "clear" the current weather until the opacity of all its sprites hits zero... or something like that! XD

Forum statistics

Threads
105,754
Messages
1,016,173
Members
137,439
Latest member
merpmerp
Top