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.

[Resolved]Obtaining Comments from Events

After looking through a bit of searching, I could not find this posted anywhere. I am pretty advanced in RGSS, though I recently tried to make some different systems where I could collect proper data from map events. I wanted to be able to collect comments in order (from the first to the last) inside each of the event on a map, but I did not find any way to do this. Does anyone know how?

EDIT: To explain it a bit better, I would for instance have a comment inside an event saying: Boss
If so, in the script, it would be something like:
Code:
if event.comment == "Boss"
I know this is wrong, but just to show off what I mean.

Thanks in advance.
 
Try this

Code:
class Game_Event < Game_Character  
  def has_comment(string)
    for p in @event.pages
      for command in p.list
        if command.code == 108
          if command.parameters[0]==string
            return true
          end
        end
      end
    end
    return false
  end
end
 

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