You can now see if you can double jump as a scout.
Version: Works with anything so long as it doesn't change the character draw event.
Conflicts: Anything that changes the Character draw event.
//Allows the player to see if they can use the double jump as a scout by making the character have a green and red tint respectively.
//By Derpduck.
object_event_clear(Character,ev_draw,0);
object_event_add(Character,ev_draw,0,"
xoffset = view_xview[0];
yoffset = view_yview[0];
xsize = view_wview[0];
ysize = view_hview[0];
if distance_to_point(xoffset+xsize/2,yoffset+ysize/2) > 800 exit;
var xr, yr;
xr = round(x);
yr = round(y);
if global.myself == -1 && cloakAlpha==1{
image_alpha = 1;
} else if((global.myself.object == id && cloakAlpha==1) || (global.myself.object == -1)) {
image_alpha = 1;
} else if (!invisible) {
image_alpha = cloakAlpha;
} else {
exit;
}
if global.myself.team == team && cloakAlpha<0.5 {
if currentWeapon.readyToStab==true{
cloakAlpha=0.5;
image_alpha=0.5;
}
}
if team == global.myself.team && (id != global.myself.object.id || global.showHealthBar == 1){
draw_set_alpha(1);
draw_healthbar(xr-10, yr-30, xr+10, yr-25,hp*100/maxHp,c_black,c_red,c_green,0,true,true);
}
if(distance_to_point(mouse_x, mouse_y)<25) {
if cloak && team!=global.myself.team exit;
draw_set_alpha(1);
draw_set_halign(fa_center);
draw_set_valign(fa_bottom);
if(team==TEAM_RED) {
draw_set_color(c_red);
} else {
draw_set_color(c_blue);
}
draw_text(xr, yr-35, player.name);
}
if class == CLASS_SCOUT{
if !doublejumpUsed{
draw_sprite_ext(sprite,floor(animationImage+animationOffset),xr,yr,image_xscale,image_yscale,image_angle,make_color_rgb(210,255,210),1);
}else{
draw_sprite_ext(sprite,floor(animationImage+animationOffset),xr,yr,image_xscale,image_yscale,image_angle,make_color_rgb(255,210,210),1);
}
}
draw_set_alpha(1);
if team == TEAM_RED ubercolour = c_red;
if team == TEAM_BLUE ubercolour = c_blue;
var sprite;
if zoomed
{
if team == TEAM_RED
{
sprite = SniperCrouchRedS
}
else
{
sprite = SniperCrouchBlueS
}
}
else
{
sprite = sprite_index
}
if omnomnomnom == true {
draw_sprite_ext(OmnomnomnomS,omnomnomnomindex,xr,yr,image_xscale,image_yscale,image_angle,c_white,1);
if ubered == 1 draw_sprite_ext(OmnomnomnomS,omnomnomnomindex,xr,yr,image_xscale,image_yscale,image_angle,ubercolour,0.7);
}
else if taunting == true{
draw_sprite_ext(tauntsprite,tauntindex,xr,yr,image_xscale,image_yscale,image_angle,c_white,1);
if ubered == 1 draw_sprite_ext(tauntsprite,tauntindex,xr,yr,image_xscale,image_yscale,image_angle,ubercolour,0.7);
}
else if player.humiliated {
draw_sprite_ext(humiliationPoses,floor(animationImage)+humiliationOffset,xr,yr,image_xscale,image_yscale,image_angle,c_white,cloakAlpha);
}
else if taunting == false {
if ubered == 0 draw_sprite_ext(sprite,floor(animationImage+animationOffset),xr,yr,image_xscale,image_yscale,image_angle,c_white,cloakAlpha);
else if ubered == 1 {
draw_sprite_ext(sprite,floor(animationImage+animationOffset),xr,yr,image_xscale,image_yscale,image_angle,c_white,1);
draw_sprite_ext(sprite,floor(animationImage+animationOffset),xr,yr,image_xscale,image_yscale,image_angle,ubercolour,0.7);
}
}
if (burnDuration > 0 or burnIntensity > 0) {
for(i = 0; i < numFlames * burnIntensity / maxIntensity; i += 1)
{
draw_sprite_ext(FlameS, alarm[5] + i + random(2), x + flameArray_x[i], y + flameArray_y[i], 1, 1, 0, c_white, burnDuration / maxDuration * 0.71 + 0.35);
}
}
");
Fixed the spelling error in the title -Sani