New account registration is temporarily disabled.

[RMXP] CHANGING EVENT NAME

Posts

Pages: 1
Hey guys!

So I've been looking around but can't quite find anywhere.... How do I change the name of an event? I'm using the Pokemon Essentials Starter Kit which makes a particle effect of light at night, but it is based on the name of the event. I want to be able to turn it off.

Is there a script I can call in general to change the name of an event? Or could someone be nice enough to write me a script for it?
Thanks!
NeverSilent
Got any Dexreth amulets?
6299
I don't really know much about scripting, but depending on what exactly you want to do, you could either just transfer the event to a different position where the player can't see it any more, or you could try using the Erase Event command. I'm not sure if that would work though, but it couldn't hurt to try.
author=NeverSilent
I don't really know much about scripting, but depending on what exactly you want to do, you could either just transfer the event to a different position where the player can't see it any more, or you could try using the Erase Event command. I'm not sure if that would work though, but it couldn't hurt to try.

Thanks :) Yeah, I found out about the event position stuff after I posted it. So I'm doing that for now. I guess it works, it's just annoying to have to make separate events and swap their positions lol.
Marrend
Guardian of the Description Thread
21806
I don't know how that script uses an event's name. However, it seems to me that if you can get how it's calling the name to activate the script, you can probably use at least part of the code to re-name the event. I figure the lines you're looking for would look something like...

i = 0
for i < $game_map.events.size
  if $game_map.events[i].name == "whatever"
    #stuff
  end
  i += 1
end


...that.

Ultimately, I think what you'd want to use would be $game_map.events[i].name = "whatever" (where "i" is the ID of the event that would trigger the in script), but I get the feeling that I'm dead wrong.
That's alright, thanks though! I think unless I get a full-proof way changing an event name and making sure it stores the data, I'll just do the extra work with Event swapping :p
LockeZ
I'd really like to get rid of LockeZ. His play style is way too unpredictable. He's always like this too. If he ran a country, he'd just kill and imprison people at random until crime stopped.
5958
You'll need a line added near the top of Game_Event. Right now it should read:

#--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_reader   :trigger                  # trigger
  attr_reader   :list                     # list of event commands
  attr_reader   :starting                 # starting flag


Change that to:


#--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_reader   :trigger                  # trigger
  attr_reader   :list                     # list of event commands
  attr_reader   :starting                 # starting flag
  attr_accessor :name                     # event name


Then you should be able to do what Marrend said.
Marrend
Guardian of the Description Thread
21806
From my understanding, Game_Event is a child of Game_Character, and can access it's "character_name" property. There's also the RPG::Event that has a "name" property, and I'm mostly sure that's the context this script wants.

*Edit: But, uh, yeah, I guess I really don't know, and might want to stop posting stuff.
LockeZ
I'd really like to get rid of LockeZ. His play style is way too unpredictable. He's always like this too. If he ran a country, he'd just kill and imprison people at random until crime stopped.
5958
The "name" property doesn't exist for Game_Character because it's a concept that doesn't exist for, say, player sprites. The "character_name" property is for the graphic's filename, not the name shown in the upper left corner of the event. So yeah, he will need it. (It won't *hurt* anyway.)
Pages: 1