Added Doomsday timer

pull/11/head
DodoBirb 4 years ago
parent daf3b43f02
commit 0326d55ad4

@ -0,0 +1,2 @@
global.doomtime = 60
image_speed = 0

@ -0,0 +1,4 @@
draw_self()
draw_set_halign(fa_right)
draw_text((x - sprite_width), (y - 12), "Change Doomsday Timer")
draw_set_halign(fa_left)

@ -0,0 +1 @@
global.doomtime = get_integer_async("Type in a doomsday time (in mins), -1 is disabled", 60)

@ -1 +1,14 @@
global.lobbyLocked = (!global.lobbyLocked)
if global.lobbyLocked
{
if (global.doomtime >= 0)
{
global.gametime = ((global.doomtime * 60) * 60)
global.doomenabled = 1
}
else
{
global.doomenabled = 0
global.gametime = 0
}
}

@ -80,3 +80,6 @@ global.damageMult = 0
global.clientVersion = "UV1.6.2"
global.experimental = 0
global.prevMonstersLeft = 0
global.gametime = 0
global.doomtime = 0
global.doomenabled = 0

@ -32,8 +32,8 @@ switch syncedELM
draw_set_font(font0)
draw_text(5, 5, ("AM2R Server: " + string(str)))
draw_text(5, 35, ((("Connected Clients: " + string(ds_list_size(playerList))) + "/") + string(maxClients)))
draw_text(5, 75, (("Energy Tanks: " + string(global.etanks)) + "/10"))
draw_text(5, 105, (("Missile Tanks: " + string(global.mtanks)) + "/44"))
draw_text(5, 75, ("Doomsday Time: " + string(global.doomtime)))
draw_text(5, 105, ("Seconds till Doomsday: " + string((global.gametime / 60))))
draw_text(5, 135, (("Super Missile Tanks: " + string(global.stanks)) + "/10"))
draw_text(5, 165, (("Power Bomb Tanks: " + string(global.ptanks)) + "/10"))
draw_text(5, 195, ("Total Remaining Metroids: " + string(global.monstersleft)))

@ -104,3 +104,5 @@ if (!global.lobbyLocked)
if (global.prevMonstersLeft != global.monstersleft)
alarm[5] = 1
global.prevMonstersLeft = global.monstersleft
if (global.lobbyLocked && global.doomenabled)
global.gametime--

@ -59,6 +59,8 @@ global.stanksSAX = 0
global.ptanksSAX = 0
global.monstersleft = 0
global.prevMonstersLeft = 0
global.gametime = 0
global.doomenabled = 0
syncedDifficulty = 1
syncedELM = 0
global.seed = 0

@ -0,0 +1,123 @@
{
"name": "oDoomTime",
"sprite": "sOption",
"visible": true,
"solid": false,
"depth": 0,
"persistent": false,
"parent_id": null,
"texture_mask_id": null,
"uses_physics": false,
"is_sensor": false,
"collision_shape": 0,
"density": 0.5,
"restitution": 0.1,
"group": 0,
"linear_damping": 0.1,
"angular_damping": 0.1,
"friction": 0.2,
"awake": false,
"kinematic": false,
"physics_vertices": [],
"events": [
[
{
"event_subtype": 0,
"actions": [
{
"lib_id": 0,
"id": 0,
"kind": 0,
"use_relative": false,
"is_question": false,
"use_apply_to": false,
"exe_type": 0,
"action_name": null,
"code_id": "gml_Object_oDoomTime_Create_0",
"argument_count": 0,
"who": 0,
"relative": false,
"is_not": false
}
]
}
],
[],
[],
[
{
"event_subtype": 0,
"actions": [
{
"lib_id": 0,
"id": 0,
"kind": 0,
"use_relative": false,
"is_question": false,
"use_apply_to": false,
"exe_type": 0,
"action_name": null,
"code_id": "gml_Object_oDoomTime_Step_0",
"argument_count": 0,
"who": 0,
"relative": false,
"is_not": false
}
]
}
],
[],
[],
[
{
"event_subtype": 4,
"actions": [
{
"lib_id": 0,
"id": 0,
"kind": 0,
"use_relative": false,
"is_question": false,
"use_apply_to": false,
"exe_type": 0,
"action_name": null,
"code_id": "gml_Object_oDoomTime_Mouse_4",
"argument_count": 0,
"who": 0,
"relative": false,
"is_not": false
}
]
}
],
[],
[
{
"event_subtype": 0,
"actions": [
{
"lib_id": 0,
"id": 0,
"kind": 0,
"use_relative": false,
"is_question": false,
"use_apply_to": false,
"exe_type": 0,
"action_name": null,
"code_id": "gml_Object_oDoomTime_Draw_0",
"argument_count": 0,
"who": 0,
"relative": false,
"is_not": false
}
]
}
],
[],
[],
[],
[],
[],
[]
]
}

@ -404,7 +404,7 @@
},
{
"x": 896,
"y": 696,
"y": 728,
"object_definition": "oLockLobby",
"instance_id": 100010,
"creation_code": null,
@ -530,7 +530,7 @@
},
{
"x": 1120,
"y": 752,
"y": 784,
"object_definition": "oResetToggles",
"instance_id": 100019,
"creation_code": null,
@ -544,7 +544,7 @@
},
{
"x": 1120,
"y": 808,
"y": 840,
"object_definition": "oDifficulty",
"instance_id": 100020,
"creation_code": null,
@ -558,7 +558,7 @@
},
{
"x": 1120,
"y": 864,
"y": 896,
"object_definition": "oELM",
"instance_id": 100021,
"creation_code": null,
@ -642,7 +642,7 @@
},
{
"x": 1120,
"y": 696,
"y": 728,
"object_definition": "oSAXModeToggle",
"instance_id": 100027,
"creation_code": null,
@ -681,6 +681,20 @@
"pre_create_code": null,
"image_speed": 0,
"image_index": 0
},
{
"x": 1248,
"y": 704,
"object_definition": "oDoomTime",
"instance_id": 100030,
"creation_code": null,
"scale_x": 1,
"scale_y": 1,
"color": 4294967295,
"rotation": 0,
"pre_create_code": null,
"image_speed": 0,
"image_index": 0
}
],
"tiles": [],

Loading…
Cancel
Save