June 13, 2021, 08:42:39 pm

The Gang Garrison 2 Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

NOTICE: Due to a rise in bot activity, new posters need to be approved before posting.

Join the community Discord server!

Pages: 1 2 [3] 4 5 6

Author Topic: Damage indicator (v2.2)  (Read 13362 times)

Phantom Brave

  • All Hail Classicwell
  • Moderator
  • *****
  • Karma: 70
  • Offline Offline
  • Posts: 12701
  • Another one --
Re: DAMAGE FUCKING INDICATOR
« Reply #30 on: June 20, 2012, 05:56:30 pm »

I just have to move the number and make it smaller so the numbers don't overlap.
Logged

http://steamcommunity.com/id/wareya/
ladies and gentlemen i would like to announce that the fact of the matter is up that the fact of the matter is a fact and it matters

Lorgan

  • Retired Randomizer Mod Developer
  • Resident Miku
  • *****
  • Karma: 27
  • Offline Offline
  • Posts: 3657
    • My own website
Re: DAMAGE FUCKING INDICATOR
« Reply #31 on: June 23, 2012, 02:15:41 am »

the damage indicator next to the health hud keeps spazzing up and down if you're falling and i have no idea what causes it  :drool:

edit:
All i did was move the original code in a separate object which gets created and destroyed with the health hud, if you want to take a look:
https://dl.dropbox.com/u/61252990/DamageIndicator.zip
« Last Edit: June 23, 2012, 02:17:23 am by Lorgan »
Logged
Unfortunately, turning a section into a communist oppressive regime is not against the forum rules, so there is really nothing we can do.
Quote from: steam
21:08 - Hullusorsa: lorgan, when will you buy us the keys?
21:09 - Lorgan: i'm waiting for greece to collapse so the value of the euro drops
21:09 - Lorgan: not even joking

Phantom Brave

  • All Hail Classicwell
  • Moderator
  • *****
  • Karma: 70
  • Offline Offline
  • Posts: 12701
  • Another one --
Re: DAMAGE FUCKING INDICATOR
« Reply #32 on: June 23, 2012, 02:19:11 am »

It's probably an order of execution issue. I'll take a look at the code and see if I can fix it if it's still present.

EDIT: No idea why it doesn't work right, I thought it was a different problem. Maybe try char's x/y instead of the viewport?
« Last Edit: June 23, 2012, 06:12:00 am by Chartreuse »
Logged

http://steamcommunity.com/id/wareya/
ladies and gentlemen i would like to announce that the fact of the matter is up that the fact of the matter is a fact and it matters

Phantom Brave

  • All Hail Classicwell
  • Moderator
  • *****
  • Karma: 70
  • Offline Offline
  • Posts: 12701
  • Another one --
Re: DAMAGE FUCKING INDICATOR
« Reply #33 on: June 25, 2012, 06:55:16 am »

I figured it out, it's text alignment.
Logged

http://steamcommunity.com/id/wareya/
ladies and gentlemen i would like to announce that the fact of the matter is up that the fact of the matter is a fact and it matters

Phantom Brave

  • All Hail Classicwell
  • Moderator
  • *****
  • Karma: 70
  • Offline Offline
  • Posts: 12701
  • Another one --
Re: DAMAGE FUCKING INDICATOR
« Reply #34 on: June 25, 2012, 07:53:48 am »

Fixed version done, added the option I needed too.
Code: [Select]
//Lorgan's /Updated/ Damage Indicator Plugin (some stuff from Vindicator)

ini_open("gg2.ini");
global.indicator_style = ini_read_real("Plugins","DmgInd_indicator_style",1);
global.indicator_playding = ini_read_real("Plugins","DmgInd_sound",1);
global.indicator_move = ini_read_real("Plugins","DmgInd_place",0);
ini_close();

//make a new menu for plugin options
if !variable_global_exists("pluginOptions") {
    global.pluginOptions = object_add();
    object_set_parent(global.pluginOptions,OptionsController); 
    object_set_depth(global.pluginOptions,-130000);
    object_event_add(global.pluginOptions,ev_create,0,'   
    menu_create(40, 140, 300, 200, 30);

    if room != Options {
        menu_setdimmed();
    }

    menu_addback("Back", "
        instance_destroy();
        if(room == Options)
            instance_create(0,0,MainMenuController);
        else
            instance_create(0,0,InGameMenuController);
    ");
    ');
   
    object_event_add(InGameMenuController,ev_create,0,'
        menu_addlink("Plugin Options", "
            instance_destroy();
            instance_create(0,0,global.pluginOptions);
        ");
    ');
}

object_event_add(global.pluginOptions,ev_create,0,'
    //very dumb workaround
    section = "Plugins";
    key1 = "DmgInd_indicator_style";
    key2 = "DmgInd_sound";
    key3 = "DmgInd_place";
    //even dumber workaround
    quote = chr(39);

    menu_addedit_select("Damage indicator style", "global.indicator_style", "
        gg2_write_ini(section, key1, argument0);
    ");

    menu_add_option(0, "Wareya"+quote+"s");
    menu_add_option(1, "Lorgan"+quote+"s");

    menu_addedit_boolean("Ding sound on hit", "global.indicator_playding", "
        gg2_write_ini(section, key2, argument0);
    ");
       
    menu_addedit_boolean("Move counter for HUDs", "global.indicator_move", "
        gg2_write_ini(section, key3, argument0);
    ");
');


if file_exists("Plugins/Resources/dingaling.wav") {
    global.indicator_ding = sound_add("Plugins/Resources/dingaling.wav",0,1);
} else exit;


global.indicator = object_add();
global.indicator2 = object_add();
global.indicator_offwhite = make_color_rgb(217,217,183);

object_event_add(global.indicator,ev_create,0,"dmg = 127; alpha = 1;");
object_event_add(global.indicator,ev_step,0,"y -= 5; alpha-=0.05;if(alpha < 0) instance_destroy();");
object_event_add(global.indicator,ev_draw,0,"
   
    //set up vars (TODO remove duplication SOMEHOW/pb hard)
    if(global.indicator_move)
    {
        size = 2;
        xoffset = 64;
        yoffset = 547;
    }
    else
    {
        size = 3;
        xoffset = 64+25;
        yoffset = 547+20;
    }
   
    draw_set_halign(fa_center);
    draw_set_valign(fa_bottom);
    if global.indicator_style draw_text_transformed_color(x,y,'-' + string(dmg),1 + dmg/100,1 + dmg/100,0,c_red,c_red,c_red,c_red,alpha);
    else {
        draw_text_transformed_color(x+1,y+1,'-' + string(dmg),1 + dmg/100,1 + dmg/100,0,global.indicator_offwhite,global.indicator_offwhite,global.indicator_offwhite,global.indicator_offwhite,alpha);
        draw_text_transformed_color(x,y,'-' + string(dmg),1 + dmg/100,1 + dmg/100,0,c_green,c_green,c_green,c_green,alpha);
    }
");

object_event_add(global.indicator2,ev_create,0,"dmg = 127; alpha = 1; a = 0;");
object_event_add(global.indicator2,ev_step,0,"a -= 5; alpha-=0.05;if(alpha < 0) instance_destroy();");
object_event_add(global.indicator2,ev_draw,0,"
   
    //set up vars
    if(global.indicator_move)
    {
        size = 2;
        xoffset = 64;
        yoffset = 547;
    }
    else
    {
        size = 3;
        xoffset = 64+25;
        yoffset = 547+20;
    }
   
    draw_set_halign(fa_left);
    draw_set_valign(fa_bottom);
    /*if global.indicator_style draw_text_transformed_color(view_xview[0]+64+25, view_yview[0]+547+a,'-' + string(dmg),3,3,0,c_red,c_red,c_red,c_red,alpha);
    else {
        draw_text_transformed_color(view_xview[0]+64+25+3, view_yview[0]+547+a+3,'-' + string(dmg),3,3,0,global.indicator_offwhite,global.indicator_offwhite,global.indicator_offwhite,global.indicator_offwhite,alpha);
        draw_text_transformed_color(view_xview[0]+64+25, view_yview[0]+547+a,'-' + string(dmg),3,3,0,c_green,c_green,c_green,c_green,alpha);
    }*/
    draw_set_alpha(alpha);
    if(global.indicator_style)
    {
        draw_set_color(c_red);
        draw_text_transformed(view_xview[0]+xoffset, view_yview[0]+yoffset+a, '-' + string(dmg),size,size,0);
    }
    else
    {
        draw_set_color(global.indicator_offwhite);
        draw_text_transformed(view_xview[0]+xoffset+size, view_yview[0]+yoffset+size+a, '-' + string(dmg),size,size,0);
        draw_set_color(c_green);
        draw_text_transformed(view_xview[0]+xoffset, view_yview[0]+yoffset+a, '-' + string(dmg),size,size,0);
    }
    draw_set_alpha(1);
");

object_event_add(Character,ev_step,ev_step_end,"
    if (!variable_local_exists('lasthp')) lasthp = hp;
    if (!variable_local_exists('dmg')) dmg = 123;
    if hp < lasthp && !cloak{
        if floor(lasthp-hp) > 1 {
            if lastDamageDealer != -1 && instance_exists(lastDamageDealer) {
                if lastDamageDealer.object != -1 && instance_exists(lastDamageDealer.object) && lastDamageDealer != player {
                    if (lastDamageDealer == global.myself or lastDamageDealer.object.healer == global.myself) {
                        if instance_exists(dmg) {
                            if dmg.alpha > 0.8 && dmg.owner == id {
                                dmg.dmg+=floor(lasthp-hp);
                                global.totalDamage += floor(lasthp - hp);
                                global.RollDmg.alarm[0] = 60;
                                dmg.x = x;
                                dmg.y = y;
                            } else {
                                dmg = instance_create(x,y,global.indicator);
                                dmg.dmg = floor(lasthp - hp);
                                dmg.owner = id;
                                global.RollDmg.alarm[0] = 60;
                                global.totalDamage += floor(lasthp - hp);
                                if global.indicator_playding sound_play(global.indicator_ding);
                            }
                        } else {
                            dmg = instance_create(x,y,global.indicator);
                            dmg.dmg = floor(lasthp - hp);
                            dmg.owner = id;
                            global.RollDmg.alarm[0] = 60;
                            global.totalDamage += floor(lasthp - hp);
                            if global.indicator_playding sound_play(global.indicator_ding);
                        }
                    }
                }
            }
            lasthp = hp;
        }
    } else lasthp = hp;
");

object_event_add(Sentry,ev_step,ev_step_end,"
    if (!variable_local_exists('lasthp')) lasthp = hp;
    if (!variable_local_exists('dmg')) dmg = 123;
    if hp < lasthp {
        if floor(lasthp-hp) > 1 {
            if lastDamageDealer != -1 && instance_exists(lastDamageDealer) {
                if lastDamageDealer.object != -1 && instance_exists(lastDamageDealer.object) {
                    if (lastDamageDealer == global.myself or lastDamageDealer.object.healer == global.myself) {
                        if instance_exists(dmg) {
                            if dmg.alpha > 0.8 && dmg.owner = id {
                                dmg.dmg+=floor(lasthp-hp);
                                global.totalDamage += floor(lasthp - hp);
                                global.RollDmg.alarm[0] = 60;
                                dmg.x = x;
                                dmg.y = y;
                            } else {
                                dmg = instance_create(x,y,global.indicator);
                                dmg.dmg = floor(lasthp - hp);
                                dmg.owner = id;
                                global.totalDamage += floor(lasthp - hp);
                                global.RollDmg.alarm[0] = 60;
                                if global.indicator_playding sound_play(global.indicator_ding);
                            }
                        } else {
                            dmg = instance_create(x,y,global.indicator);
                            dmg.dmg = floor(lasthp - hp);
                            dmg.owner = id;
                            global.totalDamage += floor(lasthp - hp);
                            global.RollDmg.alarm[0] = 60;
                            if global.indicator_playding sound_play(global.indicator_ding);
                        }
                    }
                }
            }
            lasthp = hp;
        }
    } else lasthp = hp;
");

global.RollDmg = object_add();

object_event_add(global.RollDmg,ev_create,0,"global.totalDamage = 0;");
object_event_add(global.RollDmg,ev_alarm,0,"
    dmg = instance_create(0,0,global.indicator2);
    dmg.dmg = floor(global.totalDamage);
    dmg.owner = id;
    global.totalDamage = 0;
");

object_event_add(global.RollDmg,ev_draw,0,"
    draw_set_halign(fa_left);
    draw_set_valign(fa_bottom);
   
    //set up vars
    if(global.indicator_move)
    {
        size = 2;
        xoffset = 64;
        yoffset = 547;
    }
    else
    {
        size = 3;
        xoffset = 64+25;
        yoffset = 547+20;
    }
   
    if(global.indicator_style)
    {
        draw_set_color(c_red);
        draw_text_transformed(view_xview[0]+xoffset, view_yview[0]+yoffset, '-' + string(floor(global.totalDamage)),size,size,0);
    }
    else
    {
        draw_set_color(global.indicator_offwhite);
        draw_text_transformed(view_xview[0]+xoffset+size, view_yview[0]+yoffset+size, '-' + string(floor(global.totalDamage)),size,size,0);
        draw_set_color(c_green);
        draw_text_transformed(view_xview[0]+xoffset, view_yview[0]+yoffset, '-' + string(floor(global.totalDamage)),size,size,0);
    }
");

object_event_add(HealthHud,ev_create,0,"instance_create(0,0,global.RollDmg);");
object_event_add(HealthHud,ev_destroy,0,"with(global.RollDmg) instance_destroy();");

//this needs to be done or desync spams random '-5' messages when you damage medics
object_event_clear(Medic,ev_alarm,11);
object_event_add(Medic,ev_alarm,11,"
    if(global.isHost)
    {
        hp += 5;
        alarm[11] = 30;
    }
");
You should probably remove the dead code, it was confusing me when I was fixing it.
Logged

http://steamcommunity.com/id/wareya/
ladies and gentlemen i would like to announce that the fact of the matter is up that the fact of the matter is a fact and it matters

Lorgan

  • Retired Randomizer Mod Developer
  • Resident Miku
  • *****
  • Karma: 27
  • Offline Offline
  • Posts: 3657
    • My own website
Re: DAMAGE FUCKING INDICATOR
« Reply #35 on: June 25, 2012, 01:27:57 pm »

Fixed version done, added the option I needed too.
Code: [Select]
//Lorgan's /Updated/ Damage Indicator Plugin (some stuff from Vindicator)

ini_open("gg2.ini");
global.indicator_style = ini_read_real("Plugins","DmgInd_indicator_style",1);
global.indicator_playding = ini_read_real("Plugins","DmgInd_sound",1);
global.indicator_move = ini_read_real("Plugins","DmgInd_place",0);
ini_close();

//make a new menu for plugin options
if !variable_global_exists("pluginOptions") {
    global.pluginOptions = object_add();
    object_set_parent(global.pluginOptions,OptionsController); 
    object_set_depth(global.pluginOptions,-130000);
    object_event_add(global.pluginOptions,ev_create,0,'   
    menu_create(40, 140, 300, 200, 30);

    if room != Options {
        menu_setdimmed();
    }

    menu_addback("Back", "
        instance_destroy();
        if(room == Options)
            instance_create(0,0,MainMenuController);
        else
            instance_create(0,0,InGameMenuController);
    ");
    ');
   
    object_event_add(InGameMenuController,ev_create,0,'
        menu_addlink("Plugin Options", "
            instance_destroy();
            instance_create(0,0,global.pluginOptions);
        ");
    ');
}

object_event_add(global.pluginOptions,ev_create,0,'
    //very dumb workaround
    section = "Plugins";
    key1 = "DmgInd_indicator_style";
    key2 = "DmgInd_sound";
    key3 = "DmgInd_place";
    //even dumber workaround
    quote = chr(39);

    menu_addedit_select("Damage indicator style", "global.indicator_style", "
        gg2_write_ini(section, key1, argument0);
    ");

    menu_add_option(0, "Wareya"+quote+"s");
    menu_add_option(1, "Lorgan"+quote+"s");

    menu_addedit_boolean("Ding sound on hit", "global.indicator_playding", "
        gg2_write_ini(section, key2, argument0);
    ");
       
    menu_addedit_boolean("Move counter for HUDs", "global.indicator_move", "
        gg2_write_ini(section, key3, argument0);
    ");
');


if file_exists("Plugins/Resources/dingaling.wav") {
    global.indicator_ding = sound_add("Plugins/Resources/dingaling.wav",0,1);
} else exit;


global.indicator = object_add();
global.indicator2 = object_add();
global.indicator_offwhite = make_color_rgb(217,217,183);

object_event_add(global.indicator,ev_create,0,"dmg = 127; alpha = 1;");
object_event_add(global.indicator,ev_step,0,"y -= 5; alpha-=0.05;if(alpha < 0) instance_destroy();");
object_event_add(global.indicator,ev_draw,0,"
   
    //set up vars (TODO remove duplication SOMEHOW/pb hard)
    if(global.indicator_move)
    {
        size = 2;
        xoffset = 64;
        yoffset = 547;
    }
    else
    {
        size = 3;
        xoffset = 64+25;
        yoffset = 547+20;
    }
   
    draw_set_halign(fa_center);
    draw_set_valign(fa_bottom);
    if global.indicator_style draw_text_transformed_color(x,y,'-' + string(dmg),1 + dmg/100,1 + dmg/100,0,c_red,c_red,c_red,c_red,alpha);
    else {
        draw_text_transformed_color(x+1,y+1,'-' + string(dmg),1 + dmg/100,1 + dmg/100,0,global.indicator_offwhite,global.indicator_offwhite,global.indicator_offwhite,global.indicator_offwhite,alpha);
        draw_text_transformed_color(x,y,'-' + string(dmg),1 + dmg/100,1 + dmg/100,0,c_green,c_green,c_green,c_green,alpha);
    }
");

object_event_add(global.indicator2,ev_create,0,"dmg = 127; alpha = 1; a = 0;");
object_event_add(global.indicator2,ev_step,0,"a -= 5; alpha-=0.05;if(alpha < 0) instance_destroy();");
object_event_add(global.indicator2,ev_draw,0,"
   
    //set up vars
    if(global.indicator_move)
    {
        size = 2;
        xoffset = 64;
        yoffset = 547;
    }
    else
    {
        size = 3;
        xoffset = 64+25;
        yoffset = 547+20;
    }
   
    draw_set_halign(fa_left);
    draw_set_valign(fa_bottom);
    /*if global.indicator_style draw_text_transformed_color(view_xview[0]+64+25, view_yview[0]+547+a,'-' + string(dmg),3,3,0,c_red,c_red,c_red,c_red,alpha);
    else {
        draw_text_transformed_color(view_xview[0]+64+25+3, view_yview[0]+547+a+3,'-' + string(dmg),3,3,0,global.indicator_offwhite,global.indicator_offwhite,global.indicator_offwhite,global.indicator_offwhite,alpha);
        draw_text_transformed_color(view_xview[0]+64+25, view_yview[0]+547+a,'-' + string(dmg),3,3,0,c_green,c_green,c_green,c_green,alpha);
    }*/
    draw_set_alpha(alpha);
    if(global.indicator_style)
    {
        draw_set_color(c_red);
        draw_text_transformed(view_xview[0]+xoffset, view_yview[0]+yoffset+a, '-' + string(dmg),size,size,0);
    }
    else
    {
        draw_set_color(global.indicator_offwhite);
        draw_text_transformed(view_xview[0]+xoffset+size, view_yview[0]+yoffset+size+a, '-' + string(dmg),size,size,0);
        draw_set_color(c_green);
        draw_text_transformed(view_xview[0]+xoffset, view_yview[0]+yoffset+a, '-' + string(dmg),size,size,0);
    }
    draw_set_alpha(1);
");

object_event_add(Character,ev_step,ev_step_end,"
    if (!variable_local_exists('lasthp')) lasthp = hp;
    if (!variable_local_exists('dmg')) dmg = 123;
    if hp < lasthp && !cloak{
        if floor(lasthp-hp) > 1 {
            if lastDamageDealer != -1 && instance_exists(lastDamageDealer) {
                if lastDamageDealer.object != -1 && instance_exists(lastDamageDealer.object) && lastDamageDealer != player {
                    if (lastDamageDealer == global.myself or lastDamageDealer.object.healer == global.myself) {
                        if instance_exists(dmg) {
                            if dmg.alpha > 0.8 && dmg.owner == id {
                                dmg.dmg+=floor(lasthp-hp);
                                global.totalDamage += floor(lasthp - hp);
                                global.RollDmg.alarm[0] = 60;
                                dmg.x = x;
                                dmg.y = y;
                            } else {
                                dmg = instance_create(x,y,global.indicator);
                                dmg.dmg = floor(lasthp - hp);
                                dmg.owner = id;
                                global.RollDmg.alarm[0] = 60;
                                global.totalDamage += floor(lasthp - hp);
                                if global.indicator_playding sound_play(global.indicator_ding);
                            }
                        } else {
                            dmg = instance_create(x,y,global.indicator);
                            dmg.dmg = floor(lasthp - hp);
                            dmg.owner = id;
                            global.RollDmg.alarm[0] = 60;
                            global.totalDamage += floor(lasthp - hp);
                            if global.indicator_playding sound_play(global.indicator_ding);
                        }
                    }
                }
            }
            lasthp = hp;
        }
    } else lasthp = hp;
");

object_event_add(Sentry,ev_step,ev_step_end,"
    if (!variable_local_exists('lasthp')) lasthp = hp;
    if (!variable_local_exists('dmg')) dmg = 123;
    if hp < lasthp {
        if floor(lasthp-hp) > 1 {
            if lastDamageDealer != -1 && instance_exists(lastDamageDealer) {
                if lastDamageDealer.object != -1 && instance_exists(lastDamageDealer.object) {
                    if (lastDamageDealer == global.myself or lastDamageDealer.object.healer == global.myself) {
                        if instance_exists(dmg) {
                            if dmg.alpha > 0.8 && dmg.owner = id {
                                dmg.dmg+=floor(lasthp-hp);
                                global.totalDamage += floor(lasthp - hp);
                                global.RollDmg.alarm[0] = 60;
                                dmg.x = x;
                                dmg.y = y;
                            } else {
                                dmg = instance_create(x,y,global.indicator);
                                dmg.dmg = floor(lasthp - hp);
                                dmg.owner = id;
                                global.totalDamage += floor(lasthp - hp);
                                global.RollDmg.alarm[0] = 60;
                                if global.indicator_playding sound_play(global.indicator_ding);
                            }
                        } else {
                            dmg = instance_create(x,y,global.indicator);
                            dmg.dmg = floor(lasthp - hp);
                            dmg.owner = id;
                            global.totalDamage += floor(lasthp - hp);
                            global.RollDmg.alarm[0] = 60;
                            if global.indicator_playding sound_play(global.indicator_ding);
                        }
                    }
                }
            }
            lasthp = hp;
        }
    } else lasthp = hp;
");

global.RollDmg = object_add();

object_event_add(global.RollDmg,ev_create,0,"global.totalDamage = 0;");
object_event_add(global.RollDmg,ev_alarm,0,"
    dmg = instance_create(0,0,global.indicator2);
    dmg.dmg = floor(global.totalDamage);
    dmg.owner = id;
    global.totalDamage = 0;
");

object_event_add(global.RollDmg,ev_draw,0,"
    draw_set_halign(fa_left);
    draw_set_valign(fa_bottom);
   
    //set up vars
    if(global.indicator_move)
    {
        size = 2;
        xoffset = 64;
        yoffset = 547;
    }
    else
    {
        size = 3;
        xoffset = 64+25;
        yoffset = 547+20;
    }
   
    if(global.indicator_style)
    {
        draw_set_color(c_red);
        draw_text_transformed(view_xview[0]+xoffset, view_yview[0]+yoffset, '-' + string(floor(global.totalDamage)),size,size,0);
    }
    else
    {
        draw_set_color(global.indicator_offwhite);
        draw_text_transformed(view_xview[0]+xoffset+size, view_yview[0]+yoffset+size, '-' + string(floor(global.totalDamage)),size,size,0);
        draw_set_color(c_green);
        draw_text_transformed(view_xview[0]+xoffset, view_yview[0]+yoffset, '-' + string(floor(global.totalDamage)),size,size,0);
    }
");

object_event_add(HealthHud,ev_create,0,"instance_create(0,0,global.RollDmg);");
object_event_add(HealthHud,ev_destroy,0,"with(global.RollDmg) instance_destroy();");

//this needs to be done or desync spams random '-5' messages when you damage medics
object_event_clear(Medic,ev_alarm,11);
object_event_add(Medic,ev_alarm,11,"
    if(global.isHost)
    {
        hp += 5;
        alarm[11] = 30;
    }
");
You should probably remove the dead code, it was confusing me when I was fixing it.
okay, thanks.

What do you mean with "dead code" though?
And why did you add this part:
Code: [Select]
    //set up vars (TODO remove duplication SOMEHOW/pb hard)
    if(global.indicator_move)
    {
        size = 2;
        xoffset = 64;
        yoffset = 547;
    }
    else
    {
        size = 3;
        xoffset = 64+25;
        yoffset = 547+20;
    }
   
to global.indicator1?
Logged
Unfortunately, turning a section into a communist oppressive regime is not against the forum rules, so there is really nothing we can do.
Quote from: steam
21:08 - Hullusorsa: lorgan, when will you buy us the keys?
21:09 - Lorgan: i'm waiting for greece to collapse so the value of the euro drops
21:09 - Lorgan: not even joking

Phantom Brave

  • All Hail Classicwell
  • Moderator
  • *****
  • Karma: 70
  • Offline Offline
  • Posts: 12701
  • Another one --
Re: DAMAGE FUCKING INDICATOR
« Reply #36 on: June 25, 2012, 01:30:13 pm »

because I thought I was going to change global.indicator1 but I didn't because changing global.indicator2 worked perfectly fine for everything
indicator1 never showed up ingame for me
that's what I was assuming is dead code since indicator2 does the same stuff
« Last Edit: June 25, 2012, 01:32:06 pm by Chartreuse »
Logged

http://steamcommunity.com/id/wareya/
ladies and gentlemen i would like to announce that the fact of the matter is up that the fact of the matter is a fact and it matters

Lorgan

  • Retired Randomizer Mod Developer
  • Resident Miku
  • *****
  • Karma: 27
  • Offline Offline
  • Posts: 3657
    • My own website
Re: DAMAGE FUCKING INDICATOR
« Reply #37 on: June 25, 2012, 01:33:22 pm »

because I thought I was going to change global.indicator1 but I didn't because changing global.indicator2 worked perfectly fine for everything
indicator1 never showed up ingame for me
indicator 1 is the damage count you see above people's heads when you damage them.

indicator 2 is the big number that moves up next to your healthhud after 2 seconds
Logged
Unfortunately, turning a section into a communist oppressive regime is not against the forum rules, so there is really nothing we can do.
Quote from: steam
21:08 - Hullusorsa: lorgan, when will you buy us the keys?
21:09 - Lorgan: i'm waiting for greece to collapse so the value of the euro drops
21:09 - Lorgan: not even joking

Phantom Brave

  • All Hail Classicwell
  • Moderator
  • *****
  • Karma: 70
  • Offline Offline
  • Posts: 12701
  • Another one --
Re: DAMAGE FUCKING INDICATOR
« Reply #38 on: June 25, 2012, 01:35:46 pm »

that's bizaare, I haven't noticed that one in forever because it fades out so fast
might benefit from comments
sorry for the confusion, you can remove that block
Logged

http://steamcommunity.com/id/wareya/
ladies and gentlemen i would like to announce that the fact of the matter is up that the fact of the matter is a fact and it matters

Phantom Brave

  • All Hail Classicwell
  • Moderator
  • *****
  • Karma: 70
  • Offline Offline
  • Posts: 12701
  • Another one --
Re: DAMAGE FUCKING INDICATOR
« Reply #39 on: June 25, 2012, 01:46:29 pm »

I accidentally turned the DmgInd_style key into DmgInd_indicator_style and didn't notice. Doesn't affect the plugin logic (only old settings), but I thought I should say so. I just noticed now.
« Last Edit: June 25, 2012, 02:10:39 pm by Chartreuse »
Logged

http://steamcommunity.com/id/wareya/
ladies and gentlemen i would like to announce that the fact of the matter is up that the fact of the matter is a fact and it matters

Phantom Brave

  • All Hail Classicwell
  • Moderator
  • *****
  • Karma: 70
  • Offline Offline
  • Posts: 12701
  • Another one --
Re: Damage indicator (v2.1)
« Reply #40 on: May 26, 2013, 04:09:07 am »

2.2!

https://dl.dropboxusercontent.com/u/1811521/DamageIndicatorV2.2.zip

- Fix wareya style (green on white) dropshadows on large numbers
- Round floating damage indicator size scale to an integer
- Fix rolling damage indicator alpha with scoreboard
- Re-add stereo as an option (restricted to the screen's space this time, should never drop in volume)
- Move options menu (and warHUD's) and move dingaling to another folder (and reduce its filesize)
- Alternative dingalings included, including some I rolled myself, and Quake 3's

// Note on dingalings:
// The dingaling played when you deal damage is located at /Plugins/dmgind/dingaling.wav
// To use a different dingaling, rename whatever you wav file you want to dingaling.wav and put it there
// I've included a handful of alternate dingalings in case the included one doesn't work for you
Logged

http://steamcommunity.com/id/wareya/
ladies and gentlemen i would like to announce that the fact of the matter is up that the fact of the matter is a fact and it matters

Catman

  • The Argumental
  • Veteran Member
  • ******
  • Karma: 18
  • Offline Offline
  • Posts: 4381
  • Take on me
    • Yuki Yuki Yuki
Re: Damage indicator (v2.2)
« Reply #41 on: May 26, 2013, 06:58:17 am »

I already have a dingaling plugin, does this mean I'll have to get rid of it?
Can't find it anyway :s
« Last Edit: May 26, 2013, 07:04:21 am by killercrusher232 »
Logged
My style is the best...
...so I challenge you!

Phantom Brave

  • All Hail Classicwell
  • Moderator
  • *****
  • Karma: 70
  • Offline Offline
  • Posts: 12701
  • Another one --
Re: Damage indicator (v2.2)
« Reply #42 on: May 26, 2013, 07:10:06 am »

Damage indicator already does dingaling.
Logged

http://steamcommunity.com/id/wareya/
ladies and gentlemen i would like to announce that the fact of the matter is up that the fact of the matter is a fact and it matters

Catman

  • The Argumental
  • Veteran Member
  • ******
  • Karma: 18
  • Offline Offline
  • Posts: 4381
  • Take on me
    • Yuki Yuki Yuki
Re: Damage indicator (v2.2)
« Reply #43 on: May 26, 2013, 07:13:05 am »

I must have confused it with Killmade.gml

[Edit]: I put my own dingaling into the folder where the default one is, replacing it of course, and now it doesn't seem to play it...
« Last Edit: May 26, 2013, 07:21:30 am by killercrusher232 »
Logged
My style is the best...
...so I challenge you!

Phantom Brave

  • All Hail Classicwell
  • Moderator
  • *****
  • Karma: 70
  • Offline Offline
  • Posts: 12701
  • Another one --
Re: Damage indicator (v2.2)
« Reply #44 on: May 26, 2013, 07:25:29 am »

Is the path absolutely correct, and is it a valid wav file? If you want you could upload it and I'll see if I can work it.
Logged

http://steamcommunity.com/id/wareya/
ladies and gentlemen i would like to announce that the fact of the matter is up that the fact of the matter is a fact and it matters
Pages: 1 2 [3] 4 5 6
 

Page created in 0.056 seconds with 51 queries.