hello, my code has a problem, so when i start the game the moving platforms does work, but it kinda dont get out of its place on the first trys, i have a button to reset the room i am in, and when i reset it like 3 times it works how its supposed to work can you help me?
ok- so im making a platformer game with TWO players- and when i use this tutorial i think because there is two players instead of one it screws with the platform and makes it stay in one area kinda glitchy, do you think you could help me?
I completed the tutorial, and it worked great for the platforms, but I couldn't figure out how to make it so you could move left and right on the platform
you can also do this by making these events for the moving platform object create: movesp = 4; step: if (place_meeting(x+1,y,obj_floor)) { movesp = movesp * -1; } if (place_meeting(x-1,y,obj_floor)) { movesp = movesp * -1; } x = x + movesp
This is a delicious piece of code. Thank you so much for sharing. It works really well for the best part. I am having a couple of problems though. When my character lands on it, he is stuck in the jump animation. Also, if the platform hits my character from the side, he gets stuck in it. Any help would be greatly appreciated.
I do not know why your player isn't switching back animations without seeing what is actually happening. As for getting stuck inside of the platforms I made a video that is uploading right now and will be available tomorrow that talks about that issue and how to fix it (along with better player movement on the platform itself).
Hello people. This way to make moving platforms worked for me about 50:50. I wasn't able to reproduce platforms "carrying effect". Platforms just still slides under player. My code looks almost identical but it looks like "var instance = instance_place(x,y+1,oMovingPlatform);" is not set. Nothing after "if(instance !=noone)" is executed. Ill post rest of the code, so if anybody can read anything of it, iwould like to hear. Even sugestions what to look for will help. Thanks in advance. //--------------------------------------------------------------- //Vertical Collision Platform //--------------------------------------------------------------- if (place_meeting(x,y+vsp,oMovingPlatform)) { while (!place_meeting(x,y+sign(vsp),oMovingPlatform)) { y = y + sign(vsp); } vsp = 0;
hello, my code has a problem, so when i start the game
the moving platforms does work, but it kinda dont get out of its place on the first trys, i have a button to reset the room i am in, and when i reset it like 3 times it works how its supposed to work
can you help me?
Would love to see how to implement this on a top down moving platform.
great lesson, thank you ! the movement is really smooth here.
ok- so im making a platformer game with TWO players- and when i use this tutorial i think because there is two players instead of one it screws with the platform and makes it stay in one area kinda glitchy, do you think you could help me?
Please can you go over collision elements you mentioned at the start of the video
This is a really polished tutorial, but I couldn't get the platforms to move even a little at 3:41.
The same problem.
The problem im having with this is that ive copied word for word your code and it doesnt carry the player at all
mine just stays in the same place and glitches :( i followed the code exactly too
I completed the tutorial, and it worked great for the platforms, but I couldn't figure out how to make it so you could move left and right on the platform
you can also do this by making these events for the moving platform object
create:
movesp = 4;
step:
if (place_meeting(x+1,y,obj_floor))
{
movesp = movesp * -1;
}
if (place_meeting(x-1,y,obj_floor))
{
movesp = movesp * -1;
}
x = x + movesp
For me it just made the object invisible/
Mine just glitch
This is a delicious piece of code. Thank you so much for sharing. It works really well for the best part. I am having a couple of problems though. When my character lands on it, he is stuck in the jump animation. Also, if the platform hits my character from the side, he gets stuck in it. Any help would be greatly appreciated.
I do not know why your player isn't switching back animations without seeing what is actually happening. As for getting stuck inside of the platforms I made a video that is uploading right now and will be available tomorrow that talks about that issue and how to fix it (along with better player movement on the platform itself).
going down at the end, you teleported the player that's why its not smooth fall
Hello people. This way to make moving platforms worked for me about 50:50.
I wasn't able to reproduce platforms "carrying effect". Platforms just still slides under player. My code looks almost identical but it looks like "var instance = instance_place(x,y+1,oMovingPlatform);" is not set.
Nothing after "if(instance !=noone)" is executed.
Ill post rest of the code, so if anybody can read anything of it, iwould like to hear. Even sugestions what to look for will help. Thanks in advance.
//---------------------------------------------------------------
//Vertical Collision Platform
//---------------------------------------------------------------
if (place_meeting(x,y+vsp,oMovingPlatform))
{
while (!place_meeting(x,y+sign(vsp),oMovingPlatform))
{
y = y + sign(vsp);
}
vsp = 0;
var instance = instance_place(x,y+1,oMovingPlatform);
if(instance != noone)
{
is_on_platform = true;
hsp = instance.hsp * instance.dir;
}
else
{
is_on_platform = false;
}
}
your code is very similar to mine, and since this was from 4 months ago, maybe you solved the issue by now and can help me out?
two words: "Shawn Spalding".
One word: Shaun
@@Mightyjordy Spalding
WOULD BE BETTER IF PUT CODE IN DESCRIPTION :(
But then you just copy and paste and dont know what you’re actually doing .. lol
@@BenjiBeenFly That's true, but it still makes it better for reference against typos.