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

Leaderboard

Popular Content

Showing content with the highest reputation on 06/29/2009 in all areas

  1. Frankly, the way you went about it is very confusing. Since there will be multiple enemies, the text will only appear above the first enemy... I think... I'm not sure. The random damage code baffles me even more. I recommend a solution of using a simple, separate object that you can manipulate properly. Here is what to do (its been tested): Make a new object and call it objEffect_Damage. Give the object the following codes and events: // ==== CREATE EVENT ==== _progress = 0; _dmg = 0; alarm[0] = 30; vspeed = -1/3; // ==== ALARM[0] EVENT ==== _progress += 1; if( _progress == 1 ){ alarm[0] = 30; vspeed = 0; exit; } if( _progress == 2 )instance_destroy(); // ==== DRAW EVENT ==== draw_set_font(global.fntHUD); draw_set_color(c_white); draw_set_halign(fa_center); draw_set_valign(fa_middle); draw_text( x, y, _dmg); Then, you are going to completely replace the code of enemy_basic's Collision with Shadow event into this: if( other.combo > 0 && other.atk > 0 ) { var _obj, _dmg; _dmg = floor( random( 26.9 ) ); _obj = instance_create( x, y-30,objEffect_Damage); _obj._dmg = _dmg; hp -= _dmg; } The second line of this code: "_dmg -= floor( random( 26.9 ) )", deals the random damage you want. You can always change the value of this when you need to. That should do it for now.
    1 point
  2. only one action when event loops [compare 2 general values] (leveltimer/5000) mod 2 ---Equal to zero Then do whatever.
    1 point
  3. Use this engine off of the gamemaker forums, http://gmc.yoyogames.com/index.php?showtopic=377992 It has 2 types of health bar and a back sprite its REALLY simple to use.
    1 point
  4. If you haven't, I'd suggest checking up on the tutorials YoYoGames have available on their website. http://www.yoyogames.com/make/tutorials http://wiki.yoyogames.com/index.php/Main_Page might be useful for finding out answers.
    1 point
×
×
  • Create New...