finding the event name string[Resolved]

Started by Ryex, July 17, 2009, 09:08:59 pm

Previous topic - Next topic

Ryex

July 17, 2009, 09:08:59 pm Last Edit: July 18, 2009, 12:40:19 am by Ryexander
can some one quickly tell me where I can find the string storing an events name?
I know that events are stored in
$game_map.events
but I can't figure out how to find the name (the one you enter into the editor) I need it so I can contemplate the tini little add-on I making for the UMS
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

nathmatt

heres what blizzard used

Spoiler: ShowHide
def check_event_name(event_id)
      # temporary variable
      event = $game_map.map.events[event_id]
      # initialize
      enemy, time, attr, id, group, lock, drop = 0, 5, 0x00, nil, nil, nil, nil
      move = immortal = object = full_passable = false
      # if lock setting exists
      if event.name.clone.gsub!(/\\lock\[(\d+)\]/) {"#[$1]"}
        # get lock setting
        lock = $1.to_i
      end


so id sugest u def something  (event_id) then u would go  event = $game_map.map.events[event_id] so it would know what events name to check then  if event.name.clone.gsub to do the checking
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


winkio

in other words, .name.  You probably could have saved yourself some time by just searching the help file.  It's right there, I found it in 17 seconds...

Ryex

how... odd... I looked at the Game_Event class and didn't see it declared so I thought it wasn't there... *Slaps self* [resolved]
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />