[SOLVED] Bug with action "move arg1 from arg2 (only arg1 will move)", help needed

ok so i’m making a game editor and i’ve run into an issue. when you run into a wall, the action “move player away from wall” is triggered, but instead of just staying still the player uncontrollably starts flying upwards (the game is a topdown platformer). this is definitely a bug because when i made the game originally it worked with the ingame editor, and now when i create the objects it bugs out.

That’s bad logic. Your assertion is that it worked before in another environment, therefore it should work now even though things have changed. The action hasn’t changed, but your project has. The separate objects has been working for a long time.

So the bug will be in your events. If you can provide screen snips of all the events that move the player (not just the separation from wall), then someone maybe able to help.


here is the code for the player movement. i think that’s what you wanted?

What about the separate from wall event? And is that event before or after the events in your previous post?


they are in seperate categories, but the wall seperation happens after the movement. i could provide a video if you need clarification to what my problem is

And there are no other actions that alter the player’s position?

Does the player have any behaviours attached?

And what do you mean by top-down platformer? Top-down is a style as if there’s a camera looking straight down on the scene. Platformers are side on views.

no, nothing else

no

i guess that’s the wrong terminology now that you mention it. the game looks like this where the grey circles is the player.
image

I’ve created a small project and replicated your events. It doesn’t behave the way you describe. There has to be somewhere else in your events that’s causing it. If you can share the project, I’ll download it and see what’s happening.

BTW, if you have a number of objects that behave the same way (like the objects that behave like a wall), you can create an object group, add them to that, and just have the one event that acts on the object group:

ill send you a dev build privately, and yeah i know i did that for things that kill you idk why i haven’t for the walls

i guess ill have to send it here
i dont know if you’ll be able to download this though

Is the bug in the linked game? I’ve played it, and run into the wall, door and wood, but it doesn’t do as you have described.

BTW, how do you shoot with the gun?

You shoot with the mouse. I tried it and got temporarily “stuck” in that corner. Just once. I could only go up and down. It was weird when I pressed the run key (left shift) by itself it would shift a couple of pixels inside the wall and move back when the key was released.

It makes no sense bc I don’t see code for just pressing the l shift key. I tried mashing random keys but I couldn’t reproduce it. Maybe one of my keys got stuck either physically or through code. It was weird.

the bug happens why you go into the editor (folder icon button thingy) and press escape and press the button that appears

left click

Can you share the events for that part?


the categorie “game” is literally a copy of level 8’s scene

And are the events you posted a day ago from the editor, or the game?

For me, the screen just goes black as if everything just disappears. So I’d say there something else going on in your event that’s causing this behaviour.

My suggestion is that you use "log to console" actions to work out where it gets to, what events are triggered/actioned after the collision and what it’s doing. It’ll take a while, but you’ll be able to eventually pinpoint where it’s crashing.

the events are from the lvlloader scene (self-explanatory) and level 8

you didnt place any objects, that’s why the screen goes black, its just the background color

ill try that, thank you

And is that scene used by the ingame editor? Or the game itself? Or both?


I did place objects. It just goes black when the player object collides with a wall object.

ingame editor, all the main levels have their own scene

yeah that’s the bug ive been trying to explain this whole time

ok i fixed it
how i fixed it is instead of using the collision event i used “pick the nearest arg1 that is nearest to arg2”
thanks you 2 for helping tho