iPhone App Directory
RPG Maker VX
 
Gallery Members Search Calendar Help


Welcome Guest ( Log In | Register )

Collapse

>Announcement

The 2nd Quarter Contest has arrived! Go check it out in the Community Announcements now!
 
Reply to this topicStart new topic
> basic script question
Davego44
post Apr 13 2012, 07:53 AM
Post #1



Group Icon


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.
Go to the top of the page
 
+Quote Post
   
mithos
post Apr 13 2012, 01:58 PM
Post #2


Meowthos the zombie cat!!
Group Icon


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:


If it's in one of my threads you can use it so long as you read this, and give me a link to any derivatives (i.e. works based off mine). Credit Mithos.
Full legal bit
(Click image for human-readable version :P )
My Stuff:
My Games:
Spoiler:

Story <60%> Mapping<20%> Art<80%> Scripts<97%> Database<50%>
The Legend of Zelda: Restoration of Time Story<20%> Mapping<0%> Art<2%> Scripts<70%> Database<0%>
Absolute Power Story<21%> Mapping<0%> Art<2%> Scripts<0%> Database<0%>

My Sprites:
My Scripts:
I support:
Spoiler:





Go to the top of the page
 
+Quote Post
   
Scompartimenty
post Apr 13 2012, 08:44 PM
Post #3


mikb89 ^^
Group Icon


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. ^^
Go to the top of the page
 
+Quote Post
   
Davego44
post Apr 13 2012, 08:57 PM
Post #4



Group Icon


Type: Undisclosed




Ok thanks a lot! That was exactly what I needed biggrin.gif
Go to the top of the page
 
+Quote Post
   
mithos
post Apr 13 2012, 09:45 PM
Post #5


Meowthos the zombie cat!!
Group Icon


Type: Coder
Alignment: Lawful Good




QUOTE (Scompartimenty @ Apr 13 2012, 09:44 PM) *
That was in XP, I think.


Oops, I was thinking of Map names tongue.gif

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:


If it's in one of my threads you can use it so long as you read this, and give me a link to any derivatives (i.e. works based off mine). Credit Mithos.
Full legal bit
(Click image for human-readable version :P )
My Stuff:
My Games:
Spoiler:

Story <60%> Mapping<20%> Art<80%> Scripts<97%> Database<50%>
The Legend of Zelda: Restoration of Time Story<20%> Mapping<0%> Art<2%> Scripts<70%> Database<0%>
Absolute Power Story<21%> Mapping<0%> Art<2%> Scripts<0%> Database<0%>

My Sprites:
My Scripts:
I support:
Spoiler:





Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 16th April 2014 - 09:27 AM

RPGMakerVX.net is an Privacy Policy, Legal.