fixed mouse behavior, transparency, upside-down menus, and additional 'uninitialized variables are 0' errors'
This commit is contained in:
parent
3d83304a1f
commit
9766f50d47
Binary file not shown.
|
@ -1,6 +1,7 @@
|
|||
x = 0;
|
||||
y = -50;
|
||||
z = 750;
|
||||
global.aimz = 30;
|
||||
alarm[6] = 120
|
||||
global.limit = 1
|
||||
x1 = room_width/2
|
||||
|
@ -19,6 +20,9 @@ d3d_set_projection(x,y,z,0,0,0,0,0,1);
|
|||
d3d_set_fog(true,c_ltgray,900-alarm[6]*7.4,1400-alarm[6]*7.4);
|
||||
draw_set_color(c_white);
|
||||
d3d_set_shading(false)
|
||||
gpu_set_alphatestenable(true);
|
||||
//Any threshold you prefer from 0-255, where 0 is fully transparent and 255 is fully opaque.
|
||||
gpu_set_alphatestref(20);
|
||||
d3d_set_projection_perspective(0,0,1024,768,0);
|
||||
d3d_set_lighting(true)
|
||||
d3d_light_define_ambient(c_dkgray)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
d3d_set_fog(true,c_ltgray,900-alarm[6]*7.4,1400-alarm[6]*7.4);
|
||||
d3d_set_projection_perspective(0,0,1024,768,0)
|
||||
d3d_set_projection(x,y,z,x,y+100,obj_player.z,0,0,1)
|
||||
d3d_set_projection(x,y,z,x,y+100,global.aimz,0,0,1)
|
||||
|
||||
|
|
|
@ -7,3 +7,4 @@ global.death = 0
|
|||
global.scores = 0
|
||||
sound_stop_all()
|
||||
|
||||
gpu_set_alphatestenable(false);
|
|
@ -1,6 +1,9 @@
|
|||
x = obj_player.x;
|
||||
y = obj_player.y - 100;
|
||||
z = 750;
|
||||
if (instance_exists(obj_player) ) {
|
||||
x = obj_player.x;
|
||||
y = obj_player.y - 100;
|
||||
z = 750;
|
||||
global.aimz = obj_player.z;
|
||||
}
|
||||
if global.boss = 1
|
||||
{
|
||||
d3d_set_fog(true,c_dkgray,900-alarm[6]*5,1400-alarm[6]*5);
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
d3d_set_projection_ortho(0,0,1024,768,0)
|
||||
d3d_set_lighting(false)
|
||||
d3d_set_fog( false, c_white, 600, 3000 );
|
||||
gpu_set_alphatestenable(false);
|
||||
|
||||
draw_set_font(fn_main)
|
||||
draw_text(800,700,string_hash_to_newline("FPS: / 30"))
|
||||
draw_text(900,700,string_hash_to_newline(fps))
|
||||
|
@ -30,4 +32,68 @@ if global.mesmult > 0
|
|||
global.mesmult -= 1
|
||||
}
|
||||
lifecount = 0
|
||||
|
||||
if global.death > 0
|
||||
{
|
||||
//fade to black
|
||||
with (obj_enemymanager)
|
||||
{
|
||||
instance_destroy()
|
||||
}
|
||||
with (obj_boss1)
|
||||
{
|
||||
instance_destroy()
|
||||
}
|
||||
sound_stop_all()
|
||||
d3d_set_projection_ortho(0,0,1024,768,0)
|
||||
d3d_set_lighting(false)
|
||||
draw_set_alpha(global.death/20)
|
||||
draw_rectangle_color(-1,-1,1025,769,c_black,c_black,c_black,c_black,false)
|
||||
draw_set_color(c_white)
|
||||
draw_set_font(fn_main)
|
||||
draw_text(100,400,string_hash_to_newline("With all your power you could not repel the annoying neighbors."))
|
||||
draw_text(100,430,string_hash_to_newline("You could not be left alone, and as a result could not rest in peace."))
|
||||
draw_text(100,460,string_hash_to_newline("Welcome to an eternal cacophonic hell."))
|
||||
draw_text(100,520,string_hash_to_newline("Bad ending."))
|
||||
draw_set_font(fn_big)
|
||||
draw_text(375,200,string_hash_to_newline("Game over"))
|
||||
global.death += 1
|
||||
if global.death = 250
|
||||
{
|
||||
room_goto(rm_menu)
|
||||
}
|
||||
}
|
||||
if global.victory > 0
|
||||
{
|
||||
//fade to black
|
||||
with (obj_enemymanager)
|
||||
{
|
||||
instance_destroy()
|
||||
}
|
||||
with (obj_boss1)
|
||||
{
|
||||
instance_destroy()
|
||||
}
|
||||
sound_stop_all()
|
||||
d3d_set_projection_ortho(0,0,1024,768,0)
|
||||
draw_set_alpha(global.victory/20)
|
||||
d3d_set_lighting(false)
|
||||
draw_rectangle_color(-1,-1,1025,769,c_white,c_white,c_white,c_white,false)
|
||||
draw_set_color(c_black)
|
||||
draw_set_font(fn_main)
|
||||
draw_text(100,400,string_hash_to_newline("With your power, you repeled the worthless neighbors pernamently."))
|
||||
draw_text(100,430,string_hash_to_newline("You, the ghost, can finally rest peacefully, a well earned reward."))
|
||||
draw_text(100,460,string_hash_to_newline("It is alone and quiet, just as you prefer."))
|
||||
draw_text(100,520,string_hash_to_newline("Good ending."))
|
||||
draw_set_font(fn_big)
|
||||
draw_text(375,200,string_hash_to_newline("Victory"))
|
||||
global.victory += 1
|
||||
if global.victory = 250
|
||||
{
|
||||
room_goto(rm_menu)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
d3d_set_lighting(true)
|
||||
gpu_set_alphatestenable(true);
|
|
@ -63,64 +63,4 @@ draw_set_alpha(.1)
|
|||
d3d_draw_floor(-mass-600+4096,mass-600+4096,450,-mass+900-4096,mass+900-4096,450,tex,8,8)
|
||||
|
||||
draw_set_alpha(1)
|
||||
if global.death > 0
|
||||
{
|
||||
//fade to black
|
||||
with (obj_enemymanager)
|
||||
{
|
||||
instance_destroy()
|
||||
}
|
||||
with (obj_boss1)
|
||||
{
|
||||
instance_destroy()
|
||||
}
|
||||
sound_stop_all()
|
||||
d3d_set_projection_ortho(0,0,1024,768,0)
|
||||
d3d_set_lighting(false)
|
||||
draw_set_alpha(global.death/20)
|
||||
draw_rectangle_color(-1,-1,1025,769,c_black,c_black,c_black,c_black,false)
|
||||
draw_set_color(c_white)
|
||||
draw_set_font(fn_main)
|
||||
draw_text(100,400,string_hash_to_newline("With all your power you could not repel the annoying neighbors."))
|
||||
draw_text(100,430,string_hash_to_newline("You could not be left alone, and as a result could not rest in peace."))
|
||||
draw_text(100,460,string_hash_to_newline("Welcome to an eternal cacophonic hell."))
|
||||
draw_text(100,520,string_hash_to_newline("Bad ending."))
|
||||
draw_set_font(fn_big)
|
||||
draw_text(375,200,string_hash_to_newline("Game over"))
|
||||
global.death += 1
|
||||
if global.death = 250
|
||||
{
|
||||
room_goto(rm_menu)
|
||||
}
|
||||
}
|
||||
if global.victory > 0
|
||||
{
|
||||
//fade to black
|
||||
with (obj_enemymanager)
|
||||
{
|
||||
instance_destroy()
|
||||
}
|
||||
with (obj_boss1)
|
||||
{
|
||||
instance_destroy()
|
||||
}
|
||||
sound_stop_all()
|
||||
d3d_set_projection_ortho(0,0,1024,768,0)
|
||||
draw_set_alpha(global.victory/20)
|
||||
d3d_set_lighting(false)
|
||||
draw_rectangle_color(-1,-1,1025,769,c_white,c_white,c_white,c_white,false)
|
||||
draw_set_color(c_black)
|
||||
draw_set_font(fn_main)
|
||||
draw_text(100,400,string_hash_to_newline("With your power, you repeled the worthless neighbors pernamently."))
|
||||
draw_text(100,430,string_hash_to_newline("You, the ghost, can finally rest peacefully, a well earned reward."))
|
||||
draw_text(100,460,string_hash_to_newline("It is alone and quiet, just as you prefer."))
|
||||
draw_text(100,520,string_hash_to_newline("Good ending."))
|
||||
draw_set_font(fn_big)
|
||||
draw_text(375,200,string_hash_to_newline("Victory"))
|
||||
global.victory += 1
|
||||
if global.victory = 250
|
||||
{
|
||||
room_goto(rm_menu)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
d3d_set_projection_ortho( 0, 0, 640, 480, 0 );
|
||||
draw_sprite(background5, 0,0,0);
|
||||
|
||||
draw_set_alpha(.5*(fadein/30))
|
||||
draw_set_color(c_white)
|
||||
draw_roundrect(20,20,620,620,false)
|
||||
|
|
|
@ -3,4 +3,3 @@ fadein = 0;
|
|||
menuchoice = 0;
|
||||
|
||||
d3d_start();
|
||||
d3d_set_projection_ortho( 0, 0, 640, 480, 0 );
|
|
@ -1,3 +1,6 @@
|
|||
d3d_set_projection_ortho( 0, 0, 640, 480, 0 );
|
||||
draw_sprite(background4, 0, 0, 0);
|
||||
|
||||
draw_set_alpha(.5*(fadein/30))
|
||||
draw_set_color(c_white)
|
||||
draw_triangle(460-fadein,-1,800-fadein,-1,800-fadein,1999,false)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
x = room_width / 2;
|
||||
y = room_height / 2;
|
||||
z = 30;
|
||||
global.aimz = 30;
|
||||
friction = 3
|
||||
global.timeout = 15
|
||||
global.invuln = 90
|
||||
|
|
|
@ -5,6 +5,11 @@ if global.life > 0
|
|||
else
|
||||
{
|
||||
global.death = true
|
||||
if (instance_exists(obj_spirit) ) {
|
||||
with (obj_spirit) {
|
||||
instance_destroy();
|
||||
}
|
||||
}
|
||||
}
|
||||
global.life -= 1
|
||||
global.mult = 1
|
||||
|
@ -14,4 +19,3 @@ with (obj_enemymanager)
|
|||
instance_create(x,y,obj_bombeffect)
|
||||
global.timeout = 15
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
d3d_set_lighting(true)
|
||||
pointsdirection = point_direction(x,y,mouse_x,mouse_y)
|
||||
|
||||
d3d_transform_set_identity()
|
||||
d3d_transform_set_rotation_z(pointsdirection+180)
|
||||
d3d_transform_add_translation(x,y,z)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
global.sups = pointsdirection + 180 + random(20)-10
|
||||
repeat (3)
|
||||
{
|
||||
|
|
|
@ -50,6 +50,8 @@ if up or down or left or right
|
|||
else
|
||||
chargeup = 0
|
||||
|
||||
pointsdirection = point_direction(window_get_width() / 2, window_get_height() / 2, window_mouse_get_x(), window_mouse_get_y());
|
||||
|
||||
repeat (3)
|
||||
{
|
||||
instance_create(x-5+random(10),y-5+random(10),obj_star)
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
d3d_set_projection_ortho( 0, 0, 640, 480, 0 );
|
|
@ -0,0 +1,2 @@
|
|||
d3d_set_projection_ortho( 0, 0, 640, 480, 0 );
|
||||
draw_self();
|
|
@ -1,5 +1,8 @@
|
|||
{
|
||||
"spriteId": null,
|
||||
"spriteId": {
|
||||
"name": "background3",
|
||||
"path": "sprites/background3/background3.yy",
|
||||
},
|
||||
"solid": false,
|
||||
"visible": true,
|
||||
"spriteMaskId": null,
|
||||
|
@ -20,7 +23,7 @@
|
|||
"eventList": [
|
||||
{"isDnD":false,"eventNum":27,"eventType":9,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",},
|
||||
{"isDnD":false,"eventNum":13,"eventType":9,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",},
|
||||
{"isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",},
|
||||
{"isDnD":false,"eventNum":0,"eventType":8,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",},
|
||||
],
|
||||
"properties": [],
|
||||
"overriddenProperties": [],
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
wait = 0;
|
||||
fadein = 0;
|
||||
menuchoice = 0;
|
||||
|
||||
d3d_set_projection_ortho( 0, 0, 640, 480, 0 );
|
|
@ -1,3 +1,6 @@
|
|||
d3d_set_projection_ortho( 0, 0, 640, 480, 0 );
|
||||
|
||||
draw_sprite(background5, 0,0,0);
|
||||
draw_set_alpha(.5*(fadein/30))
|
||||
draw_set_color(c_white)
|
||||
draw_roundrect(20,20,620,620,false)
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
{"instances":[
|
||||
{"properties":[],"isDnd":false,"objectId":{"name":"obj_credits","path":"objects/obj_credits/obj_credits.yy",},"inheritCode":false,"hasCreationCode":false,"colour":4294967295,"rotation":0.0,"scaleX":1.0,"scaleY":1.0,"imageIndex":0,"imageSpeed":1.0,"inheritedItemId":null,"frozen":false,"ignore":false,"inheritItemSettings":false,"x":0.0,"y":0.0,"resourceVersion":"1.0","name":"inst_2EA5198D","tags":[],"resourceType":"GMRInstance",},
|
||||
],"visible":true,"depth":0,"userdefinedDepth":true,"inheritLayerDepth":false,"inheritLayerSettings":false,"gridX":32,"gridY":32,"layers":[],"hierarchyFrozen":false,"resourceVersion":"1.0","name":"Compatibility_Instances_Depth_0","tags":[],"resourceType":"GMRInstanceLayer",},
|
||||
{"spriteId":{"name":"background5","path":"sprites/background5/background5.yy",},"colour":4294967295,"x":0,"y":0,"htiled":true,"vtiled":true,"hspeed":0.0,"vspeed":0.0,"stretch":false,"animationFPS":1.0,"animationSpeedType":1,"userdefinedAnimFPS":false,"visible":true,"depth":2147483500,"userdefinedDepth":true,"inheritLayerDepth":false,"inheritLayerSettings":false,"gridX":32,"gridY":32,"layers":[],"hierarchyFrozen":false,"resourceVersion":"1.0","name":"Compatibility_Background_0_background5","tags":[],"resourceType":"GMRBackgroundLayer",},
|
||||
{"spriteId":null,"colour":4290822336,"x":0,"y":0,"htiled":false,"vtiled":false,"hspeed":0.0,"vspeed":0.0,"stretch":false,"animationFPS":15.0,"animationSpeedType":0,"userdefinedAnimFPS":false,"visible":true,"depth":2147483600,"userdefinedDepth":true,"inheritLayerDepth":false,"inheritLayerSettings":false,"gridX":32,"gridY":32,"layers":[],"hierarchyFrozen":false,"resourceVersion":"1.0","name":"Compatibility_Colour","tags":[],"resourceType":"GMRBackgroundLayer",},
|
||||
],
|
||||
"inheritLayers": false,
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
{"instances":[
|
||||
{"properties":[],"isDnd":false,"objectId":{"name":"obj_menu","path":"objects/obj_menu/obj_menu.yy",},"inheritCode":false,"hasCreationCode":false,"colour":4294967295,"rotation":0.0,"scaleX":1.0,"scaleY":1.0,"imageIndex":0,"imageSpeed":1.0,"inheritedItemId":null,"frozen":false,"ignore":false,"inheritItemSettings":false,"x":0.0,"y":0.0,"resourceVersion":"1.0","name":"inst_C00E7BFC","tags":[],"resourceType":"GMRInstance",},
|
||||
],"visible":true,"depth":0,"userdefinedDepth":true,"inheritLayerDepth":false,"inheritLayerSettings":false,"gridX":32,"gridY":32,"layers":[],"hierarchyFrozen":false,"resourceVersion":"1.0","name":"Compatibility_Instances_Depth_0","tags":[],"resourceType":"GMRInstanceLayer",},
|
||||
{"spriteId":{"name":"background4","path":"sprites/background4/background4.yy",},"colour":4294967295,"x":0,"y":0,"htiled":true,"vtiled":true,"hspeed":0.0,"vspeed":0.0,"stretch":false,"animationFPS":1.0,"animationSpeedType":1,"userdefinedAnimFPS":false,"visible":true,"depth":2147483500,"userdefinedDepth":true,"inheritLayerDepth":false,"inheritLayerSettings":false,"gridX":32,"gridY":32,"layers":[],"hierarchyFrozen":false,"resourceVersion":"1.0","name":"Compatibility_Background_0_background4","tags":[],"resourceType":"GMRBackgroundLayer",},
|
||||
{"spriteId":null,"colour":4290822336,"x":0,"y":0,"htiled":false,"vtiled":false,"hspeed":0.0,"vspeed":0.0,"stretch":false,"animationFPS":15.0,"animationSpeedType":0,"userdefinedAnimFPS":false,"visible":true,"depth":2147483600,"userdefinedDepth":true,"inheritLayerDepth":false,"inheritLayerSettings":false,"gridX":32,"gridY":32,"layers":[],"hierarchyFrozen":false,"resourceVersion":"1.0","name":"Compatibility_Colour","tags":[],"resourceType":"GMRBackgroundLayer",},
|
||||
],
|
||||
"inheritLayers": false,
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
{"instances":[
|
||||
{"properties":[],"isDnd":false,"objectId":{"name":"obj_settings","path":"objects/obj_settings/obj_settings.yy",},"inheritCode":false,"hasCreationCode":false,"colour":4294967295,"rotation":0.0,"scaleX":1.0,"scaleY":1.0,"imageIndex":0,"imageSpeed":1.0,"inheritedItemId":null,"frozen":false,"ignore":false,"inheritItemSettings":false,"x":0.0,"y":0.0,"resourceVersion":"1.0","name":"inst_8C947F04","tags":[],"resourceType":"GMRInstance",},
|
||||
],"visible":true,"depth":0,"userdefinedDepth":true,"inheritLayerDepth":false,"inheritLayerSettings":false,"gridX":32,"gridY":32,"layers":[],"hierarchyFrozen":false,"resourceVersion":"1.0","name":"Compatibility_Instances_Depth_0","tags":[],"resourceType":"GMRInstanceLayer",},
|
||||
{"spriteId":{"name":"background5","path":"sprites/background5/background5.yy",},"colour":4294967295,"x":0,"y":0,"htiled":true,"vtiled":true,"hspeed":0.0,"vspeed":0.0,"stretch":false,"animationFPS":1.0,"animationSpeedType":1,"userdefinedAnimFPS":false,"visible":true,"depth":2147483500,"userdefinedDepth":true,"inheritLayerDepth":false,"inheritLayerSettings":false,"gridX":32,"gridY":32,"layers":[],"hierarchyFrozen":false,"resourceVersion":"1.0","name":"Compatibility_Background_0_background5","tags":[],"resourceType":"GMRBackgroundLayer",},
|
||||
{"spriteId":null,"colour":4290822336,"x":0,"y":0,"htiled":false,"vtiled":false,"hspeed":0.0,"vspeed":0.0,"stretch":false,"animationFPS":15.0,"animationSpeedType":0,"userdefinedAnimFPS":false,"visible":true,"depth":2147483600,"userdefinedDepth":true,"inheritLayerDepth":false,"inheritLayerSettings":false,"gridX":32,"gridY":32,"layers":[],"hierarchyFrozen":false,"resourceVersion":"1.0","name":"Compatibility_Colour","tags":[],"resourceType":"GMRBackgroundLayer",},
|
||||
],
|
||||
"inheritLayers": false,
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
{"instances":[
|
||||
{"properties":[],"isDnd":false,"objectId":{"name":"obj_plot","path":"objects/obj_plot/obj_plot.yy",},"inheritCode":false,"hasCreationCode":false,"colour":4294967295,"rotation":0.0,"scaleX":1.0,"scaleY":1.0,"imageIndex":0,"imageSpeed":1.0,"inheritedItemId":null,"frozen":false,"ignore":false,"inheritItemSettings":false,"x":0.0,"y":0.0,"resourceVersion":"1.0","name":"inst_EDEF5217","tags":[],"resourceType":"GMRInstance",},
|
||||
],"visible":true,"depth":0,"userdefinedDepth":true,"inheritLayerDepth":false,"inheritLayerSettings":false,"gridX":32,"gridY":32,"layers":[],"hierarchyFrozen":false,"resourceVersion":"1.0","name":"Compatibility_Instances_Depth_0","tags":[],"resourceType":"GMRInstanceLayer",},
|
||||
{"spriteId":{"name":"background3","path":"sprites/background3/background3.yy",},"colour":4294967295,"x":0,"y":0,"htiled":true,"vtiled":true,"hspeed":0.0,"vspeed":0.0,"stretch":false,"animationFPS":1.0,"animationSpeedType":1,"userdefinedAnimFPS":false,"visible":true,"depth":2147483500,"userdefinedDepth":true,"inheritLayerDepth":false,"inheritLayerSettings":false,"gridX":32,"gridY":32,"layers":[],"hierarchyFrozen":false,"resourceVersion":"1.0","name":"Compatibility_Background_0_background3","tags":[],"resourceType":"GMRBackgroundLayer",},
|
||||
{"spriteId":null,"colour":4290822336,"x":0,"y":0,"htiled":false,"vtiled":false,"hspeed":0.0,"vspeed":0.0,"stretch":false,"animationFPS":15.0,"animationSpeedType":0,"userdefinedAnimFPS":false,"visible":true,"depth":2147483600,"userdefinedDepth":true,"inheritLayerDepth":false,"inheritLayerSettings":false,"gridX":32,"gridY":32,"layers":[],"hierarchyFrozen":false,"resourceVersion":"1.0","name":"Compatibility_Colour","tags":[],"resourceType":"GMRBackgroundLayer",},
|
||||
],
|
||||
"inheritLayers": false,
|
||||
|
|
Loading…
Reference in New Issue