Jump to content


_241189

Member Since 25 Nov 2011
Offline Last Active Jun 05 2012 04:02 PM

Posts I've Made

In Topic: help with displaying number of lives and score

02 June 2012 - 12:43 AM

try creating an object with all those variables and make them global variables. Also put that object in the first room with the Game Start event


could you elaborate.

In Topic: help with moving platforms

01 June 2012 - 01:21 AM

if place_meeting(x,y+1,moving_platform)
{
mp=instance_place(x,y+1,moving_platform)
hspeed=mp.hspeed*2
}
else hspeed=0
This code worked for me. Do you realize in your moving platform your actually moving double your hspeed? Hspeed moves for you automatically, and you add to it as well.

thank you for all your help. Your code worked however i did have to change the 2 in the line "hspeed=mp.hspeed*2" to a 1 to get it to work properly.

In Topic: help with moving platforms

01 June 2012 - 12:46 AM

if place_meeting(x,y+1,moving_platform)
{
mp=instance_position(x,y+1,moving_platform)
hspeed=mp.hspeed
}
else hspeed=0
I would put that in the step event of your player. The issue this brings up is if you normally use hspeed to move your character (instead of just changing x) the player will freeze on the platform.


i am getting an error that states that hspeed is an unknown variable. how would i correct that?

In Topic: help with moving platforms

01 June 2012 - 12:36 AM

would i add a collusion event under the player object then execute a piece of code that would set the players hspeed equal to the hspeed of the moving platform?

In Topic: help with moving platforms

01 June 2012 - 12:34 AM

Have you tried using the player to try and detect if the moving platform is under it? That may work better.


no i have not. how would you suggest going about that?