Problem with Common event

Thefirelion

Veteran
Veteran
Joined
Mar 25, 2017
Messages
58
Reaction score
15
First Language
Spanish
Primarily Uses
RMVXA
I'm having a strange problem with a common event that is activated from a switch when I do it, the error "undefined method "x" for Nil: Nilclass" BUT, when I execute it through an event (parallel process) on the map itself, it works perfectly, I do not know why and if I could get advice I would appreciate it.

Note: it is the only "common event" with this happening to me.

I do not have any script that uses that switch, I do not have any that involves the default methods in the engine used, I have the script that uses the written methods (proxy.inprox)


Screenshots
event.png Untitledhh.png

EDIT: Nevermind, I found the problem, any moderator can close this threads. Thanks and Sorry. :kaoswt2:
 
Last edited:

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,492
Reaction score
408
First Language
German
Primarily Uses
RMMV
The Problem is that a common Event doesnt have an Event ID.
But if that Common Event is called by an Event with Eventcommand "Common Event", than the code becomes like the code of that Event
and therefore if the code uses Event Id of "This Event", all is working well. Without the calling Event i assume that you get the error because of this.
 

Thefirelion

Veteran
Veteran
Joined
Mar 25, 2017
Messages
58
Reaction score
15
First Language
Spanish
Primarily Uses
RMVXA
Yes,

I think I'll have to use another method to check the distance of the player with respect to an event, I use this script https://forums.rpgmakerweb.com/index.php?threads/proximity-events.415/ for this and other purposes but it seems that it is not for generic uses so that they can be used for a "common event". I forgot that the common events use is the current map data when using events in the list of commands (which I do not like).
 

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,492
Reaction score
408
First Language
German
Primarily Uses
RMMV
Did you try to exchange @event_id with the direct id number of the event you want to get checked?
Instead of Proxy.inprox?(@event_id) you do Proxy.inprox?(1)
@event_id is referencing the Event which is executing the code. Since one Event can control the conditions for several others,
you will not need @event_id, but maybe a direct number. But i know to little about your approach to be sure.

Edit: And yes if you use for example Events 20 to 30 for this and you use common event,
than you need the same event ids on the other maps to work.
Or you do one map Event with individual Event IDs directly on each Map, but the common Event is ment to safe you from that work if possible.

Edit: You seem not to like some stuff, would you like to elaborate what this mechanic would look like for the player when playing? If we understand that, we might can come
up with a alternative Solution.
 
Last edited:

Thefirelion

Veteran
Veteran
Joined
Mar 25, 2017
Messages
58
Reaction score
15
First Language
Spanish
Primarily Uses
RMVXA
Edit:
Well, It will be in the conventional way. Thanks for the Attention.
 
Last edited:

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,492
Reaction score
408
First Language
German
Primarily Uses
RMMV
Conventional way? What do you mean by that? Maybe we can improve your approach and make it alot easier or much shorter.
 
Last edited:

Thefirelion

Veteran
Veteran
Joined
Mar 25, 2017
Messages
58
Reaction score
15
First Language
Spanish
Primarily Uses
RMVXA
If there was a way to detect if an event (unimportant of the ID) is in the same tile to jump, without much tangle of events would be wonderful.

I found this piece of code

($game_map.events[id].y - $game_player.y).abs == 0 && ($game_map.events[id].x - $game_player.x) == -1 && $game_player.direction == 4

but you need to list the events and do the checks of each one, obviously in a separate event.
Until I find a better method, the operation of my event will have to be reconfigured.
 
Last edited:

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,492
Reaction score
408
First Language
German
Primarily Uses
RMMV
What about the "Get Location Info" Command, it can tell you which Event Id is on a certain Maptile.
For example you check Location info for Infront of Player, and if the Variable is more than 0 than an Event is on that Map Position.
Now you can make that the Player Moves 1 Step Backwards for example.
 

Thefirelion

Veteran
Veteran
Joined
Mar 25, 2017
Messages
58
Reaction score
15
First Language
Spanish
Primarily Uses
RMVXA
What about the "Get Location Info" Command, it can tell you which Event Id is on a certain Maptile.
For example you check Location info for Infront of Player, and if the Variable is more than 0 than an Event is on that Map Position.
Now you can make that the Player Moves 1 Step Backwards for example.
I'm sorry for the delay in answering, I was busy this week. As soon as this issue I eliminated the script of proximity that I had and I ended up configuring the event so that it would work in the most summarized way possible.

I did not use the Get Location Info command, through a conditional event check of proximity formula and the condicional facing command in the same event. That at the same time is combined with other mechanics that I implemented in my game.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,040
Messages
1,018,470
Members
137,821
Latest member
Capterson
Top