Imiglikos
Member
Hi,
I have the text above the weapon and under the weapon on the HUD bar. I wanted to use a script that adds a shadow to my text ... but I have no idea how to put it together ..
plain text connection was not a problem, but here is a weapon selection that also uses a similar code ...
below is the text that I have above the weapon and under the weapon
create
draw gui
below is a script that I want to insert instead of plain text ...
Thank you
I have the text above the weapon and under the weapon on the HUD bar. I wanted to use a script that adds a shadow to my text ... but I have no idea how to put it together ..
plain text connection was not a problem, but here is a weapon selection that also uses a similar code ...
below is the text that I have above the weapon and under the weapon
create
GML:
//current weapon
current_weapon = 0;
//width of the text shadow
text_shadow_width = 3;
draw gui
GML:
draw_set_color(c_white);
draw_set_valign(fa_middle);
draw_set_halign(fa_center);
draw_set_font(fn_weapon);
var i = current_weapon;
{
if !(i = 0)
draw_text(560,105,""+string(global.wep[i,e_wep.ammo])); //draw ammo weapons
draw_text(560,25,""+string(global.wep[i,e_wep.name])); //draw weapons
}
below is a script that I want to insert instead of plain text ...
GML:
for (var i = 1; i <= text_shadow_width; i++) {
draw_text_shadow(560, 105, ""+string(global.wep[i,e_wep.ammo]), fn_weapon, i, c_black, -1, 120, 1, 1, 0, c_white, c_white, c_white, c_white, 1);
draw_text_shadow(560, 25, ""+string(global.wep[i,e_wep.name]), fn_weapon, i, c_black, -1, 120, 1, 1, 0, c_white, c_white, c_white, c_white, 1);
}
Thank you