I know that there was some sort of syntax for it, but I couldn't find it in Game_Interpreter and RPG::Event, and I don't really want to search for a script that uses comments (I'm lazy), so what's the proper syntax for reading an event comment?
Thanks in advance.
Insert this scriptlet into your project.
class Game_Event
attr_reader :event
end
now:
$game_map.events[id].event.pages[id of page].list[index/position in the events list].parameters[0]
If you need more info just ask
EDIT:
EXPLANATION:
$game_map.events[1]
Accesses the event with the id of 1.
$game_map.events[1].event
Accesses the instance of RPG::Event related to this event
$game_map.events[1].event.pages[0]
the first object in the @pages array which consists of all the event pages of this event. 1 will access the second page while 0 will access the first one.
$game_map.events[1].event.pages[0].list[1]
The @list array contains all the commands on the page. 1 will access the second on the page while 0 will access the first one.
$game_map.events[1].event.pages[1].list[1].parameters[0]
@parameters is an array containing all the values that comes with the command. In case of a comment, the first and only parameter is the text in it.
Just as above, 0 refers to the first object.
I forgot to say that I'm using VX :P
But that should work all the same. I'll give it a try and tell you if it works.
I added some explanations just for the sake of it.
Do you mean scripts that use event comments to set values, etc, etc.?
If so you need to only search for the specific code for comments. You may also need to look a little into Regular Expressions, depending on what you are using this for.
http://forum.chaos-project.com/index.php/topic,56.0.html
Actually, I already read into that tutorial a while ago, but thanks for the input.