Jump to content
A 2021 backup has been restored. Forums are closed and work in progress. Join our Discord server for more updates! ×
SoaH City Message Board

FAlling blocks


Recommended Posts

Though that will make the block stand still for a certain amount of time, then instantly fall with 5 pixels/step downwards. I suggest you add some gravity to that movement.

Creation event:
hit = false;
timer = 16;
ysp = 0;

Step event:
if ( !hit )
{
if ( collision_with_player ) hit = true;
}
else
{
if ( timer > 0 ) timer -= 1;
else
{
ysp += gravity_constant;
y += ysp;
}
}
[/CODE]

  • Like 1
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...