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 Profile Posts

People1.png & SF_People1.png added!!!!

Adventurer:
"Why your body looks like a bird?"

Stranger:
"Because I'm harpy"

Adventurer:
"Clap along if you feel like a room without a roof"

*Both dancing to Pharrell Williams song*
Stream will be live shortly with a make-up session of the Interactive Text Adventure! Feel free to drop by!
Pootscooter wrote on Pharonix's profile.
Hey @Pharonix, just wondering what you're up to lately and if you've had an opportunity to check out the LTBS thread in the past few days...(a couple of us could really use your expertise). Hope you are well and Happy Thanksgiving!
Anyone know the best size image to put in signature?

Forum statistics

Threads
105,501
Messages
1,014,246
Members
137,165
Latest member
keochauau
Top