sonic101 Posted July 16, 2007 Report Share Posted July 16, 2007 Does anyone know a decent way to do falling blocks in game maker 7.0 registered? you know the ones, they're there, you jump oin them and in a few secodns they fall out from underneath you? Link to comment Share on other sites More sharing options...
Spike Posted July 16, 2007 Report Share Posted July 16, 2007 In create event: hit=0 In collision with Sonic: if(hit=0){hit=1; alarm[0]=20} In alarm 0 event: motion_set(270,5) There you go. Feel free to adjust the numbers to make it stay longer, or fall faster. 1 Link to comment Share on other sites More sharing options...
sonic101 Posted July 16, 2007 Author Report Share Posted July 16, 2007 Thank you spike:) much ablieged I rep upped you. Link to comment Share on other sites More sharing options...
Spike Posted July 16, 2007 Report Share Posted July 16, 2007 No problem! Glad to help. Link to comment Share on other sites More sharing options...
Xoram Posted July 16, 2007 Report Share Posted July 16, 2007 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] 1 Link to comment Share on other sites More sharing options...
sonic101 Posted July 16, 2007 Author Report Share Posted July 16, 2007 Ah thanks zoram, that works quite well too heh Link to comment Share on other sites More sharing options...
Recommended Posts