Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

HBGames

Hi again everyone,
I have this little snippit of code from the Mouse Script by Cybersam
It reads the event commands and changes the mouse's icon accordingly
Code:
  def comment_include(*args)

    list = *args[0].list

    trigger = *args[1]

    return nil if list == nil

    return nil unless list.is_a?(Array)

    for item in list

      next if item.code != 108

      par = item.parameters[0].split(' | ')

      return item.parameters[0] if par[0] == trigger

    end

    return nil

  end

 

Pretty much, make a comment that goes like
Comment: IMS | Start | NPC
it will read for the comment in the event.
It doesn't read through Common Events however.
Is there a way to make it read through the common event on that event?
I have a Crafting Workshop in multiple towns, and it would be helpful for this and many other cases if it could read through the common event as well
Like:
--
Call Common Event: Crafting System
--

That is the whole event there. (Action Button)
Within that Common Event, i have
--
Comment: IMS | Start | NPC
Script Call: $scene = Scene_Craft.new
--

Thats the event. I used a simpler one there, but hopefully you get the idea! :)
So yeah, a method of reading through the Common Event commands as well as the Event itself is needed.
It would help me out a lot if you could figure out how to do this!
Thanks guys!

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top