Hope you don't mind if it is read in the event comments but here it is.
class Game_Event < Game_Character
#--------------------------------------------------------------------------
alias chaosg1_platformer_game_event_update update
#--------------------------------------------------------------------------
def name
return @event.name
end
#--------------------------------------------------------------------------
def id
return @id
end
#--------------------------------------------------------------------------
def update
chaosg1_platformer_game_event_refresh_set_page
$game_player.event_decoder(self, @list, @character_name)
end
end
Since I find SDK easier to use for this kind of things, here is a part of the sdk.
Create a new script a copy paste this.
module EVE
def self.event_comment_input(*args)
parameters = []
list = *args[0].list
elements = *args[1]
trigger = *args[2]
return nil if list == nil
return nil unless list.is_a?(Array)
for item in list
next if item.code != 108
if item.parameters[0] == trigger
start = list.index(item) + 1
finish = start + elements
for id in start...finish
next if !list[id]
parameters.push(list[id].parameters[0])
end
return parameters
end
end
return nil
end
end
This reads the comment in the event and if it says platform does the action next.
def event_decoder(event, list, character_name)
return if character_name == ""
return if list == nil
parameters = EVE.event_comment_input(event, 1, "platform")
return if parameters.nil?
#do things here
end
an explanation in how the sdk method work copyed from the sdk of course lol
5.5 – Standard Event Comment Input
Any script that requires input from an event comment should use the
following:
SDK.event_comment_input(event, elements, trigger)
where:
event = an object of the event
elements = the number of elements the method is to process
trigger = the text value triggering the script to start processing
or
SDK.event_comment_input(page, elements, trigger)
where:
page = an object of the event.page
elements = the number of elements the method is to process
trigger = the text value triggering the script to start processing
The method returns nil if the trigger can not be found; otherwise, it
returns a list of the parameters from the event.
This is just a way of doing things there are other though, but I found this one simpler(for me)..
If you need help just ask.. I am still learning too but i think i can help you with this
