Announcement
Announcement
| 2nd Quarter Contest Announcement posted! See the Community Announcements section. |
![]() ![]() |
Apr 13 2012, 07:53 AM
Post
#1
|
|
![]() Type: Undisclosed |
for event in $game_map.events_xy(x,y)
From that line in a method within a module is it possible to get that event's name? or maybe that event's page.list? If there is a way please let me know. |
|
|
|
Apr 13 2012, 01:58 PM
Post
#2
|
|
![]() Meowthos the zombie cat!! ![]() Type: Coder Alignment: Lawful Good |
If I recall correctly, events names are not actually loaded when the game starts, first you would have to setup a variable and get the event name to load at startupp, then you would be able to use something like, for example, `event.name`
-------------------- I've been away for a while. Here's my really quite old stuff
Spoiler: |
|
|
|
Apr 13 2012, 08:44 PM
Post
#3
|
|
![]() mikb89 ^^ ![]() Type: Coder Alignment: Chaotic Neutral |
That was in XP, I think.
In VX you can just write somewhere in the scripts: CODE class Game_Event < Game_Character def name return @event.name end def name=(n) @event.name = n end end Then access the event.name as you want. event.list is already enabled, but just for reading. ^^ |
|
|
|
Apr 13 2012, 08:57 PM
Post
#4
|
|
![]() Type: Undisclosed |
Ok thanks a lot! That was exactly what I needed
|
|
|
|
Apr 13 2012, 09:45 PM
Post
#5
|
|
![]() Meowthos the zombie cat!! ![]() Type: Coder Alignment: Lawful Good |
That was in XP, I think. Oops, I was thinking of Map names This post has been edited by mithos: Apr 13 2012, 09:45 PM -------------------- I've been away for a while. Here's my really quite old stuff
Spoiler: |
|
|
|
![]() ![]() |
| Lo-Fi Version | Time is now: 25th May 2013 - 06:15 PM |
|
|