Calling Common event with Variables buggy or misuse? Player XY info

Joined
Aug 8, 2015
Messages
6
Reaction score
1
First Language
english
Primarily Uses
I spent several hours trying to figure out why my player position kept being positioned wrong after an event triggered the death of another character. It seems to be that for some odd reason calling Common Events to store Variables is my mistake or a bug.

The odd thing is the problem only happens on the 4th character in the party. If any other party members use this event setup, they work fine.

The Setup

Game Starts with 4 party members

Show Player Follower is turned off so only the player, Actors 1 is visible/controled.

However I have 3 events using the remaining 3 Actors, who are set to approach or fixed and use relevant sprites.

The events are linked to the lives of the Actors.

So if Actor 2 dies, then the Actor 2 Event become UnDead and will attack the player or is turned off.

The problem.

I set up some common events, Player position, Actor1 position, Actor2 position etc etc

These common events set control variables all triggers are set to none. For player it has MapID, players map x and players map y.

For the event/actors is has the event x and event y.

For some reason when I call for the common events then swap the position (transfer the player to the living event and the dead event to where the player was) of the player with a still living event all works fine except for when it is Actor 4 turn to be the Player.

However if I just remove any calling of common events for the 4th Actor an input the exact same info I'm asking for, same order even, it for some reason works. Picture attached...

If you see my mistake or know what is causing the problem, please let me know. At this point I'll just remove the calling of this sort of common event. The time I though I was  saving, not setting up those extra lines of code each time was not worth the time I lost trying to figured out where the bug/mistake was.

commonvariablecall.jpg
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
My first question is, what plugins are you using, do they use variables or switches, and have you either changes those variables/switches in the plugin setup to use ones that you're not using (and then reserved them so you don't accidentally use them), or ensured you are not using the same variables/switches for your own stuff that the plugin is using?


To test, disable all your plugins, save your game, then play and see if it is still an issue. If still not unsure, start a brand new game with NO plugins, and set up your events and common events the same way and see if it works properly.
 
Joined
Aug 8, 2015
Messages
6
Reaction score
1
First Language
english
Primarily Uses
@Shaz thanks, I hadn't thought of checking the scripts. Using VX Ace so no plugins.

I looked but didn't find anything setting variables. Only a mention in the notes.

I'm currently using these scripts, one made by you, thanks for making it).   :)

Lazy Tilesets - Importer (used this once but after I got the tiles loaded I removed the comment in the notes.

Slip Damage EX v1.06 by AdiktuzMiko

Yanfly Engine Ace - Move Restrict Region v1.03

And then two other scripts,  one renaming the ShopSell to Discard and ShopBuy to Take. Another simply scaleing MP in the window down to 0, since I don't need it.

I'll try the brand new game test and see what happens.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Just disable them all and see if things change.


Also see if YOU have any other events/common events that use those variables and might be changing them without your knowledge.
 
Joined
Aug 8, 2015
Messages
6
Reaction score
1
First Language
english
Primarily Uses
Learned something new. Didn't know ctrl + q could comment out everything. nice...

Unfortunately, commenting out the scripts didn't help.

Since you mentioned making sure the variable was not being used elsewhere, for a test, I redid all the variables on a separate blank group list so I'd know I didn't set a variable there and then delete it but forget about a reference to it. Even with the completely new variables for the player's position and the 4th actor position, the character still ended up in the wrong place.

This means to me that the variable setup is fine and that some other issue is causing the player transport to malfunction, but only on the last actor.

I think part of the issue is that I'm new to this and I may be using parts of the event incorrectly. One thing I'm not sure about, is the best way to lay out the conditional branches. I'm wondering if my way of using them is causing the problem

What I'm doing to change from one dead character the next is to use a conditional branch like this.

Conditional Branch: [Jane] is [Death] Inflicted

***Conditional Branch: [ben] is in party

******then do this

***else

***end

***Conditional Branch: [Kelly] is in party

******then do this

***else

***end

***Conditional Branch: [Frank] is in party

******then do this

***else

***end

else

end

I originally had all of the "is in party branches" in else of the parenting "is in party branch". But this seemed logically wrong when I had three different conditions instead of just two (disclaimer, not a programmer, so I'm sure I could be wrong).

Conditional Branch: [Jane] is [Death] Inflicted

***Conditional Branch: [ben] is in party

******then do this

***else

******Conditional Branch: [Kelly] is in party

******then do this

******else

*********Conditional Branch: [Frank] is in party

*********then do this

*********else

*********end

******end

***end

else

end

Doing it the way above seemed odd to me. Which way is better? Could this be the root of my problem if each condition has the same call for player position? I'd think they would be fine since they should only run if the condition is met.

I'm also assuming the top condition is always read first and if it has the correct condition, the later ones will be ignored. Is this wishful thinking? The control switches should help get them out of the event page that has the conditions.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c

Forum statistics

Threads
105,857
Messages
1,017,019
Members
137,564
Latest member
McFinnaPants
Top