Can't get my platform to move

so in my game Wapiti Run II I’m trying to get a platform to go from one side of the screen to the other but it only goes part way then it comes back to where it was and then it goes back and forth in one area this is the code I’m trying to use{“data”:{“behavior”:{“v”:“2”,“nodes”:[{“inputCount”:0,“outputCount”:0,“name”:“Custom”,“behaviorType”:“logic.NodeGroup”,“x”:180,“y”:32,“group”:"",“id”:“2e2a92c688e53f40”,“isMenuItem”:false},{“inputCount”:0,“outputCount”:1,“name”:“Always”,“behaviorType”:“logic.triggers.Always”,“x”:180,“y”:32,“group”:“2e2a92c688e53f40”,“id”:“a562a053e887b441”},{“inputCount”:3,“outputCount”:3,“name”:“Velocity”,“behaviorType”:“logic.properties.Physics”,“x”:540,“y”:32,“group”:“2e2a92c688e53f40”,“id”:“a562ce9b15389144”},{“inputCount”:3,“outputCount”:3,“name”:“Flip”,“behaviorType”:“logic.properties.Flip”,“x”:720,“y”:-128,“group”:“2e2a92c688e53f40”,“id”:“a5627c08a1356841”,“vertical”:false},{“inputCount”:3,“outputCount”:1,“name”:“Number”,“behaviorType”:“logic.logic.Value”,“x”:360,“y”:32,“group”:“2e2a92c688e53f40”,“id”:“a56376c3d1bc9443”,“startVal”:4,“tag”:""},{“inputCount”:1,“outputCount”:1,“name”:“Extractor”,“behaviorType”:“logic.properties.Extractor”,“x”:360,“y”:-96,“group”:“2e2a92c688e53f40”,“id”:“541d2b8c1afdde4e”,“targetId”:0,“prop”:“x”},{“gateVal”:290,“mode”:“greater than”,“inputCount”:2,“outputCount”:2,“name”:“Filter”,“behaviorType”:“logic.logic.Filter”,“x”:540,“y”:-160,“group”:“2e2a92c688e53f40”,“id”:“541e2f0a5c082442”},{“gateVal”:32,“mode”:“less than”,“inputCount”:2,“outputCount”:2,“name”:“Filter”,“behaviorType”:“logic.logic.Filter”,“x”:540,“y”:-64,“group”:“2e2a92c688e53f40”,“id”:“541ed2ce6cd3dc40”}],“links”:[{“input_id”:“541d2b8c1afdde4ei0”,“output_id”:“a562a053e887b441o0”},{“input_id”:“a56376c3d1bc9443i1”,“output_id”:“a562a053e887b441o0”},{“input_id”:“a562ce9b15389144i2”,“output_id”:“a56376c3d1bc9443o0”},{“input_id”:“541e2f0a5c082442i0”,“output_id”:“541d2b8c1afdde4eo0”},{“input_id”:“541ed2ce6cd3dc40i0”,“output_id”:“541d2b8c1afdde4eo0”},{“input_id”:“a5627c08a1356841i0”,“output_id”:“541e2f0a5c082442o0”},{“input_id”:“a5627c08a1356841i1”,“output_id”:“541ed2ce6cd3dc40o0”}]}}} can’t make it go any further

3 Likes

try using a screenshot :neutral_face:

4 Likes

sorry just search Wapiti Run II Flowlab Game Creator - Wapiti Run II

4 Likes

i tried messing around with the code a lot, couldn’t get anything to work. maybe its a bug with the physics? :confused:

3 Likes

anyone else know a way to help me

4 Likes

Ask JR_01 or Grazer for help on how to customize this example for your game.

4 Likes

but I want to have it move back and forth without the player being able to control it so they have to use skill to get on it instead of just jumping on it with them controlling the platform but it’s a good idea for a different type of platform

2 Likes

They don’t control it in the example, it moves back and forth on its own and the player has to use skill to get on it.

1 Like

So you want the platform to move across the entire screen?
This is an easy fix, but first you need to answer a question.

Why is this filter set to 341?

image

3 Likes

Yeah, both sides of screen are 320 at default…
Way more than 320

2 Likes

That’s mostly true… but his game is bigger than default screen, so it’s going to be a lot bigger actually.

I’m just trying to see why he put 341 in the filter, then I’ll give the correct value.

3 Likes

II’mwell I put in that 341 because I was just messing around so I didn’t even know what to put it at so I was just increasing and decreasing at seeing how that would affect the movement but I couldn’t really figure out what I was even changing because as it said earlier I just got it from the default thing so with a bigger screen I don’t really know what I’m doing

2 Likes

sorry I just didn’t understand what you were saying

2 Likes

so I put in a new code but now I’m having the reverse problem if it goes all the way across the screen and then just disappears off of the camera and the camera is filming the whole thing it’s just go to the link I gave up above because that might explain it and see that it moves all the way across the screen and then disappears into whatever is beyond the game

1 Like

Alright, so what that means is that it’s flipping 341 pixels from the left side of the game. Since its pixels, it would be understandable that it looks as if didn’t change anything. But now that we know we are looking at the pixels, there is something we could do to see how many pixels are across the screen.

Each grid cell in Flowlab is 32 pixels long.
image

And your game’s width is set to 32,
this means there are 32 grid cells going from left to right.
image


Since we know there are 32 Grid cells from side to side of the screen,
and that there are 32 pixels in each grid cell, we can multiply these 2 together.

Using a calculator, we see that 32 x 32 = 1024. Try using this in the filter.


PS. use less than 16 and greater than 1008, this moves half a grid cell on each side so its not clipping in the wall

2 Likes

well I’m now using a different code which doesn’t require a filter but I used it in my last game Flowlab Game Creator - WAPITI RUN and it worked perfectly fine for the bats all I had to do was make a few tweaks but now it just flies off the side of the screen

1 Like

That’s because the bats are hitting the wall with collision,
but because you want a platform, you turned off “movable” so the platform does not have collision trigger.

I suggest using the filter idea has you had before.

4 Likes

thanks that makes more sense

2 Likes

3 Likes