Stuck In Place After Transfer Player

p0_boy

anti-kumbaya
Veteran
Joined
Mar 26, 2019
Messages
64
Reaction score
29
First Language
English
Primarily Uses
RMMV
Hello, everybody-

I am running into a problem and wonder if any of you can please help me out?

I am trying to streamline the way my character moves from one map to the other using a Common Event and a Map Event but upon executing it, my character is transferred to the other map but is stuck, walking in place (see GIF).



I have a Common Event called xferAUTO which looks like this:


◆Control Variables:#0034 xferTemp = Direction of Player
◆If:xferDIR = xferTemp
◆Play SE:Steps (90, 100, 0)
◆Script:var xferXY = $gameVariables.value(35).split(",",2);
:Script:$gameVariables.setValue(33, xferXY[0]);
:Script:$gameVariables.setValue(32, xferXY[1]);
◆Transfer Player:{xferMAP_ID} ({xferTempX},{xferTempY})

:End

xferAUTO is called when the player touches a Map Event:



◆Control Variables:#0037 xferDIR = 4
◆Control Variables:#0036 xferMAP_ID = 2
◆Control Variables:#0035 xferXY = "51,16"
◆Common Event:xferAUTO

What am I doing wrong?

Thanks in advance!
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
there are two possibilities here.
can your actor turn, yes or no?

if no then somewhere on the new map or in the common events there is an autorun that is not switched off.
find it and turn it off to be able to move again.

if yes, then you have a passability problem. either that specific tile is impassable (especially as it looks as if you're using something like parallax mapping where the passability is handled differently than normal) or the tileset in itself has a broken passability (in that case, which version is your editor as there was a problem in the older MV versions that can't happen in any decent update)
 

p0_boy

anti-kumbaya
Veteran
Joined
Mar 26, 2019
Messages
64
Reaction score
29
First Language
English
Primarily Uses
RMMV
there are two possibilities here.
can your actor turn, yes or no?

if no then somewhere on the new map or in the common events there is an autorun that is not switched off.
find it and turn it off to be able to move again.

if yes, then you have a passability problem. either that specific tile is impassable (especially as it looks as if you're using something like parallax mapping where the passability is handled differently than normal) or the tileset in itself has a broken passability (in that case, which version is your editor as there was a problem in the older MV versions that can't happen in any decent update)
Hey, Andar- thanks for the speedy reply.

My character cannot turn- they are simply stuck.

The only Autorun that I have in the entire game so far is for an NPC event (but I am pretty sure it turns itself off):





I am using a plug-in called Pv_Scriptlets that runs the Javascript for my HUD as a parallel process:





But even disabling that doesn't fix the problem.

I am NOT using parallax mapping, and changing the X, Y coordinates of the Transfer Player command to a tile that I know is passable doesn't work either.

I am using v1.6.2, which I think is the latest.

So I am really stumped. But I appreciate your help anyway!
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
If you cannot turn, then you have an active autorun on that map or in the common events.
It doesn't matter if you remember it or not, it is there - and you now have to search for it.

A script/plugin is NOT an autorun - a script can break a game in many ways, but it is unlikely to do so with such an error as you describe.

Please check ALL common events and all map events on that specific map - there is an autorun that you've forgotten about.
 

p0_boy

anti-kumbaya
Veteran
Joined
Mar 26, 2019
Messages
64
Reaction score
29
First Language
English
Primarily Uses
RMMV
If you cannot turn, then you have an active autorun on that map or in the common events.
It doesn't matter if you remember it or not, it is there - and you now have to search for it.

A script/plugin is NOT an autorun - a script can break a game in many ways, but it is unlikely to do so with such an error as you describe.

Please check ALL common events and all map events on that specific map - there is an autorun that you've forgotten about.
Hey, Andar - thanks again for your help.

I went through all my Common Events:





All the events on my Destination Map:





All the events on my Source Map:





And there is 1 Autorun (Event 4, on the Source Map- which I mentioned in the previous post) and 1 Parallel Event (Event 24, on the Destination Map):



Both of these instances are triggered by switches and turn themselves off after being called.

I am very conscious about the Autoruns and Parallel processes that I use because I know they can potentially cause lag in gameplay.

So, I really don't think it has to do with an Autorun. Again, I am stumped.

I appreciate your suggestions though.
 
Last edited:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
The only time your character cannot turn is when inputs are disabled, and normally that only happens during the course of an autorun event.. Unless you have a plugin that disables input in other instances or you actually have set your character to Direction Fix ON somehow and didn't set it to OFF (this one won't explain why you cant move though)
 

p0_boy

anti-kumbaya
Veteran
Joined
Mar 26, 2019
Messages
64
Reaction score
29
First Language
English
Primarily Uses
RMMV
The only time your character cannot turn is when inputs are disabled, and normally that only happens during the course of an autorun event.. Unless you have a plugin that disables input in other instances or you actually have set your character to Direction Fix ON somehow and didn't set it to OFF (this one won't explain why you cant move though)
Thanks for the info, Engr. Adiktuzmiko.

However, I really don't have any Autorun events aside from the NPC one I listed above.

I don't know if this provides any more insight but Transfer Player seems to work if I don't use any variables or Common Events:





Could it be a plug-in?

 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
Transfer Player works with either variables or direct values, so it will ofc work even if you dont use variables...

If you want to know if its a plugin problem, you should try disabling your plugins first and see if the problem is gone.. If its gone, turn on your plugins one by one and test, repeat this until the problem happens again, the last plugin you turned on is probably the culprit then

Also based on your clip, it seems like you can actually turn as the cat turned right
 

p0_boy

anti-kumbaya
Veteran
Joined
Mar 26, 2019
Messages
64
Reaction score
29
First Language
English
Primarily Uses
RMMV
Transfer Player works with either variables or direct values, so it will ofc work even if you dont use variables...

If you want to know if its a plugin problem, you should try disabling your plugins first and see if the problem is gone.. If its gone, turn on your plugins one by one and test, repeat this until the problem happens again, the last plugin you turned on is probably the culprit then

Also based on your clip, it seems like you can actually turn as the cat turned right
Engr. Adiktuzmiko,

I think I didn't convey my last message too well-

The character DOES gets stuck when I use Transfer Player with variables:







The character DOESN'T get stuck if I don't use variables with Transfer Player:





So, in short-

  • Transfer Player is successful if I don't use variables and a Common Event (Character is not stuck).
  • Transfer Player isn't successful if I do use variables and a Common Event (Character is stuck).

I will go through the plug-ins later on. Salamat- I appreciate the help.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
BTW this has probably nothing to do with your problem but I realized you are double processing your X,Y coordinate..

On your touch event:

Variable 35 = "X,Y"

Then on your common event:

var = variable 35 split
Variable 33 = var[0]
Variable 32 = var[1]

Now that is unnecessary as your can simply set variables 33,32 to the values directly in your Touch event and it will still be usable in your common event..

On your touch event:

Variable 33 = X
Variable 32 = Y

Its not probably causing the problem as you still get transferred but it will at least optimize your transfer eventing..
 

p0_boy

anti-kumbaya
Veteran
Joined
Mar 26, 2019
Messages
64
Reaction score
29
First Language
English
Primarily Uses
RMMV
BTW this has probably nothing to do with your problem but I realized you are double processing your X,Y coordinate..

On your touch event:

Variable 35 = "X,Y"

Then on your common event:

var = variable 35 split
Variable 33 = var[0]
Variable 32 = var[1]

Now that is unnecessary as your can simply set variables 33,32 to the values directly in your Touch event and it will still be usable in your common event..

On your touch event:

Variable 33 = X
Variable 32 = Y

Its not probably causing the problem as you still get transferred but it will at least optimize your transfer eventing..
Thanks :)

It's actually on purpose- I like to be able to see the coordinates on one line rather than two separate ones.

I had used to separate lines as you suggested with my JumpXY common event, but that was the first common event I wrote for this game (I've only been using RPG Maker for a month).

I find that the extra processing doesn't affect the performance that much. I just wish I could figure out why my character is getting stuck, haha.

Thanks anyway though.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
Yeah its kinda weird that you get stuck when using variables but all is fine if you used direct values.. Btw have you tried setting the variables directly as I suggested and see if it still gets you stucked?
 

Aloe Guvner

Walrus
Veteran
Joined
Sep 28, 2017
Messages
1,628
Reaction score
1,115
First Language
English
Primarily Uses
RMMV
1.) Can you check the console for any errors? (press F8 during playtest to open it)

2.) If I'm understanding correctly, you have a string with a value, say "10,15" and you're splitting it into an array of strings. Can you confirm you actually have the expected value for variable 35? You can use a Show Text event command to show the value, or a console log.
Code:
console.log('Var 35 is: ', $gameVariables.value(35))
3.) The issue could be that the individual x and y variables are a string, but the teleport probably expects an integer (a number).
Try:
Code:
$gameVariables.setValue(33, parseInt(xferXY[0]))
$gameVariables.setValue(32, parseInt(xferXY[1]))
 

p0_boy

anti-kumbaya
Veteran
Joined
Mar 26, 2019
Messages
64
Reaction score
29
First Language
English
Primarily Uses
RMMV
Thank you, Aloe Guvner and Engr. Adiktuzmiko, for the responses!

I finally got it working using Engr. Adiktuzmiko's suggestion of setting the variables directly. This is what my final event and Common event looks like:



◆Control Variables:#0037 xferDIR = 4
◆Control Variables:#0036 xferMAP_ID = 2
◆Control Variables:#0033 xferX = 52
◆Control Variables:#0032 xferY = 16
◆Control Variables:#0031 xferDoorType = 1
◆Common Event:xferAUTO



◆Control Variables:#0030 xferTEMP = Direction of Player
◆If:xferDIR = xferTEMP
◆If:xferSMALLROOM is ON
◆Control Variables:#0034 xferSTEPS = 1

:Else
◆Control Variables:#0034 xferSTEPS = 2

:End
◆Script:switch($gameVariables.value(31)){
:Script:case 1: var xferSND = {name: "Steps", volume: 90, pitch: 100, pan: 0}; AudioManager.playSe(xferSND); break;
:Script:}
◆Transfer Player:{xferMAP_ID} ({xferX},{xferY})
◆Script:switch($gameVariables.value(37)) {
:Script:case 2: $gameTemp.setDestination($gameVariables.value(33),($gameVariables.value(32)+$gameVariables.value(34))); break;
:Script:case 4: $gameTemp.setDestination(($gameVariables.value(33)-$gameVariables.value(34)), $gameVariables.value(32)); break;
:Script:case 8: $gameTemp.setDestination($gameVariables.value(33),($gameVariables.value(32)-$gameVariables.value(34))); break;
:Script:case 6: $gameTemp.setDestination(($gameVariables.value(33)+$gameVariables.value(34)), $gameVariables.value(32)); break;
:Script:}
◆Control Switches:#0037 xferSMALLROOM = OFF
◆Control Variables:#0031 xferDoorType = 0

:End



Aloe Guvner- both you and Pujii (over at the Steam forums) suggested converting the values to integer and I feel that you are right but I haven't been able to test your suggestions yet (I am trying to trudge forward and complete my game) but I might at a later stage (when I come back to refining and optimizing code) if I try to consolidate all the arguments that I am passing to the xferAUTO common events through multiple variables into one long variable that I turn into an array and parse.

I appreciate your input and help though. Many thanks!
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
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'??

Forum statistics

Threads
105,864
Messages
1,017,056
Members
137,573
Latest member
nikisknight
Top