All buttons are working as the Action button right before teleporting

Status
Not open for further replies.

Zamazawarma

Villager
Member
Joined
Sep 28, 2020
Messages
10
Reaction score
2
First Language
French
Primarily Uses
RMXP
Hello there,

This is my first real post on this board, but I've introduced myself here. Here's the situation.

I have a key that summons a common event, which teleports the character on another map, which acts like a Pokédex, sort of. I do this because I need a Bestiary, yet no Bestiary script that I've been looking into fills my needs. Instead of listing all monsters that have been encountered/fought, I want to be able to manually tell which 'monsters' (heroes and NPC's, actually) are to be displayed. Since my project won't have any combat, I don't need to know how many times they've been beaten, or what are their stats, or their strenghts and weaknesses, or whatever. Just a list of characters, with a little picture and some strings of text. And since I have absolutely no clue about scripting, that's why I'm using a map instead. I call it the Codex.

Here's my problem.

When my player's character is facing an event, pressing the 'Codex' key will, as intended, teleport the player on the Codex map, but it will also trigger the event, which is unintended. In practice, I press the key, I'm teleported in the Codex, then the event of the previous map starts to talk. This is very annoying.

Can you guys help me? Thanks in advance. Have a good day.
 

KK20

Just some XP Scripter
Veteran
Joined
Oct 11, 2018
Messages
258
Reaction score
95
First Language
English
Primarily Uses
RMXP
Post screenshots of your events
 

KK20

Just some XP Scripter
Veteran
Joined
Oct 11, 2018
Messages
258
Reaction score
95
First Language
English
Primarily Uses
RMXP
Getting a different issue where pressing the "codex" button teleports me to the map and returns back immediately. Can't reproduce triggering a map event when facing one.
 

Zamazawarma

Villager
Member
Joined
Sep 28, 2020
Messages
10
Reaction score
2
First Language
French
Primarily Uses
RMXP
Haven't you forgot to switch 'on' the 'IsInCodex' switch while still on the map, right before teleporting to the Codex, then 'off', while still in the Codex, right before teleporting back to the previous map?
 

KK20

Just some XP Scripter
Veteran
Joined
Oct 11, 2018
Messages
258
Reaction score
95
First Language
English
Primarily Uses
RMXP
If I don't, then I just stay stuck on the codex map. Any further presses to the "codex button" will just position me back to the starting point on the codex map. You're not using any scripts, right?

Maybe it would be better for you to just upload a demo.
 

Zamazawarma

Villager
Member
Joined
Sep 28, 2020
Messages
10
Reaction score
2
First Language
French
Primarily Uses
RMXP
Many thanks for your time @KK20.

You're not using any scripts, right?
Nope. Well, yes, but I can reproduce the bug even without any script, as you can see in this demo in which I cleaned anything unrelated. (If needed, you'll find the font I use in the 'Fonts' folder.) Don't forget to place yourself facing the event before pressing the 'Codex' key.

One thing I noticed: you'll see there's a message string in common events #14 and #15. If you get rid of these strings, then the game behaves as you said:

Getting a different issue where pressing the "codex" button teleports me to the map and returns back immediately.
But if you leave these strings, then the game behaves as I said:

In practice, I press the key, I'm teleported in the Codex, then the event of the previous map starts to talk.
I just can't wrap my head around it! If it's intended behaviour from the game engine, I'd like to understand how and why.
 
Last edited:

KK20

Just some XP Scripter
Veteran
Joined
Oct 11, 2018
Messages
258
Reaction score
95
First Language
English
Primarily Uses
RMXP
It is some kind of internal bug with XP; there's a collection of some of them here for example:
Seems like the Input state is carried over during a map transition, and all parallel processes are executed immediately prior to the transition.

What I found that worked for me was to change the CodexKey common event to this:
Code:
Conditional Branch: Script: Input.trigger?(Input::Y)
  Script: Input.update
  # your other conditional branch with the calls to the other common events here
 

Zamazawarma

Villager
Member
Joined
Sep 28, 2020
Messages
10
Reaction score
2
First Language
French
Primarily Uses
RMXP
It... it works! I'm not sure how to express my gratitude in proper English, so I won't even try. Instead, allow me to thank you many many muches!

If you're interested in getting a headache, here are my last observations:
- Normal conditional branch WITH messages at the start of common events #14 and #15 will cause the bug I mentioned, i.e. when you press the right key on the first map, said common events will execute (meaning you will access the second map), but then the event you were facing on the first map will inappropriately be triggered after you've arrived on the second map.
- Normal conditional branch WITHOUT messages at the start of said events will cause the bug YOU mentioned, i.e. when you press the right key on the first map, said common events will execute (meaning you will access the second map), but you will immediately be sent back to the first map. However, the event you were facing on the first map will not be inappropriately triggered.
- Scripted condition WITH messages at the start of said events will still cause the bug I mentioned.
- Scripted condition WITHOUT messages at the start of said events won't cause either of these bugs.

What it means, I suppose, is that your workaround only fixes the bug you mentioned, but not the one I mentioned. I'm kind of frustrated about it, but it won't effect the player since I don't intend to display any message right after he arrives on the second map. I'm not even sure why I did put these messages in the first place. Anyway. Your solution makes it work like I intended in the first place, and that's all that matters. Thanks again.

Case closed, I guess?
 

hiddenone

Lurker Extraordinaire
Global Mod
Joined
Feb 19, 2014
Messages
2,486
Reaction score
5,314
First Language
english
Primarily Uses
RMMZ

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

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

Latest Threads

Latest Posts

Latest Profile Posts

Its been almost 6 months since i've been here last and 5 years before that. the worst part is losing the game you were working on in a cpu fire.

Well time to go at it again.
my game is coming together im so happy
In this day and age, i might switch back to RMXP. I’ve lost faith in all the new plugins.
Wow it's been forever since I last logged in! I STILL want to make a game... I'll start it one day for sure!! It's a dream of mine.
This days I couldn't do anything... My mind is so confused and I couldn't work at all, I only wanted to play video games with my friends and that made all my projects delay a lot. Someone else feels this kind of thing sometimes? :/

Forum statistics

Threads
104,286
Messages
1,005,259
Members
135,796
Latest member
PurplexiaSphinx
Top