You can now select mons.

This commit is contained in:
TheGreenTie 2020-02-29 04:21:59 -06:00
parent ce074d277a
commit 0d8aa1e448
26 changed files with 298 additions and 29 deletions

View File

@ -2718,6 +2718,14 @@
"resourceType": "GMIncludedFile"
}
},
{
"Key": "1c861d7a-eed5-61b7-02f5-201672b6f730",
"Value": {
"id": "482209aa-4441-0244-c512-227919df4685",
"resourcePath": "scripts\\lock_create\\lock_create.yy",
"resourceType": "GMScript"
}
},
{
"Key": "1ca3a684-f0db-4045-b6ac-4f2b65d44b34",
"Value": {
@ -8138,7 +8146,7 @@
"Key": "51d00fa8-eb85-4086-a732-a161d9d217d8",
"Value": {
"id": "85207e30-7cc0-3776-b034-06e06a4b170a",
"resourcePath": "scripts/button_set/button_set.yy",
"resourcePath": "scripts\/button_set\/button_set.yy",
"resourceType": "GMScript"
}
},
@ -9350,6 +9358,14 @@
"resourceType": "GMIncludedFile"
}
},
{
"Key": "5e879a22-94f8-a47e-fee7-5e134971dd7f",
"Value": {
"id": "5e4d42d1-e9c1-445d-aab0-21b4518f43cc",
"resourcePath": "scripts\\lock_destroy\\lock_destroy.yy",
"resourceType": "GMScript"
}
},
{
"Key": "5e897add-69a2-4a4e-865d-c901e4107f9f",
"Value": {
@ -11082,7 +11098,7 @@
"Key": "6ee30c99-62bc-bcf5-3853-e159533ab6d0",
"Value": {
"id": "c2bb0f39-a2d2-3f48-0435-8f8ddcd09621",
"resourcePath": "scripts/align_x/align_x.yy",
"resourcePath": "scripts\/align_x\/align_x.yy",
"resourceType": "GMScript"
}
},
@ -11646,6 +11662,14 @@
"resourceType": "GMIncludedFile"
}
},
{
"Key": "73ea69de-6c0e-9d8b-6da5-41f465a27cce",
"Value": {
"id": "f7e6195c-1399-9428-7f4f-16230c06747b",
"resourcePath": "scripts\\selected_set\\selected_set.yy",
"resourceType": "GMScript"
}
},
{
"Key": "73f15987-cdc7-4e1d-b596-31c4b5673a83",
"Value": {
@ -14610,7 +14634,7 @@
"Key": "9081971b-e1be-521f-34be-38fcfa32f684",
"Value": {
"id": "5556752a-d72e-8013-c6ef-9fc461634e8e",
"resourcePath": "scripts/align_y/align_y.yy",
"resourcePath": "scripts\/align_y\/align_y.yy",
"resourceType": "GMScript"
}
},
@ -15146,7 +15170,7 @@
"Key": "961739d9-bcef-9d3d-a9a7-6d0487191e8e",
"Value": {
"id": "cf68e563-92be-d148-9a63-2bb86baa8cc2",
"resourcePath": "scripts/icon_path_get/icon_path_get.yy",
"resourcePath": "scripts\/icon_path_get\/icon_path_get.yy",
"resourceType": "GMScript"
}
},
@ -17118,6 +17142,14 @@
"resourceType": "GMIncludedFile"
}
},
{
"Key": "a96934df-1c09-4a34-875b-89440eed891c",
"Value": {
"id": "f0109d99-4f62-47d7-9b8c-c5ee1f693394",
"resourcePath": "sprites\\spr_lock\\spr_lock.yy",
"resourceType": "GMSprite"
}
},
{
"Key": "a9696e6f-9c23-499a-88e2-dee8dd359fbc",
"Value": {
@ -25486,6 +25518,14 @@
"resourceType": "GMIncludedFile"
}
},
{
"Key": "ff62894e-7035-4e31-b764-10e24aa65d4b",
"Value": {
"id": "a90d748d-477c-6b87-0177-9404f21634a8",
"resourcePath": "objects\\obj_lock\\obj_lock.yy",
"resourceType": "GMObject"
}
},
{
"Key": "ff6b5cf3-7897-41ab-af06-4ff966619ed4",
"Value": {
@ -25573,7 +25613,10 @@
"5c7fb6ce-864a-a30e-f665-d51d74835878",
"6ee30c99-62bc-bcf5-3853-e159533ab6d0",
"9081971b-e1be-521f-34be-38fcfa32f684",
"1087bf1b-acd2-8101-2f92-1c8433c77a66"
"1087bf1b-acd2-8101-2f92-1c8433c77a66",
"73ea69de-6c0e-9d8b-6da5-41f465a27cce",
"1c861d7a-eed5-61b7-02f5-201672b6f730",
"5e879a22-94f8-a47e-fee7-5e134971dd7f"
],
"tutorial": ""
}

View File

@ -4,6 +4,7 @@ initials_set();
savedata_load();
dex_galar_load();
boxes_spawn();
selected_set();
scr_window_resize();
button_create(0, 0, but.plus);

View File

@ -0,0 +1,6 @@
image_index = 1;
image_speed = 0.25;
image_xscale = global.icon_scale;
image_yscale = global.icon_scale;

View File

@ -0,0 +1,14 @@
if (global.selecting != noone)
{
x = global.selecting.x;
y = global.selecting.y;
image_xscale = global.icon_scale;
image_yscale = global.icon_scale;
}
else
lock_destroy();
if (keyboard_check_pressed(vk_escape))
lock_destroy();

View File

@ -0,0 +1,50 @@
{
"id": "ff62894e-7035-4e31-b764-10e24aa65d4b",
"modelName": "GMObject",
"mvc": "1.0",
"name": "obj_lock",
"eventList": [
{
"id": "6ac4d05d-a04f-972f-b2ab-c47cc28391f6",
"modelName": "GMEvent",
"mvc": "1.0",
"IsDnD": false,
"collisionObjectId": "00000000-0000-0000-0000-000000000000",
"enumb": 0,
"eventtype": 0,
"m_owner": "ff62894e-7035-4e31-b764-10e24aa65d4b"
},
{
"id": "b4acad12-c557-5687-f268-c58c719a0183",
"modelName": "GMEvent",
"mvc": "1.0",
"IsDnD": false,
"collisionObjectId": "00000000-0000-0000-0000-000000000000",
"enumb": 1,
"eventtype": 3,
"m_owner": "ff62894e-7035-4e31-b764-10e24aa65d4b"
}
],
"maskSpriteId": "00000000-0000-0000-0000-000000000000",
"overriddenProperties": null,
"parentObjectId": "00000000-0000-0000-0000-000000000000",
"persistent": false,
"physicsAngularDamping": 0.1,
"physicsDensity": 0.5,
"physicsFriction": 0.2,
"physicsGroup": 0,
"physicsKinematic": false,
"physicsLinearDamping": 0.1,
"physicsObject": false,
"physicsRestitution": 0.1,
"physicsSensor": false,
"physicsShape": 1,
"physicsShapePoints": null,
"physicsStartAwake": true,
"properties": [
],
"solid": false,
"spriteId": "a96934df-1c09-4a34-875b-89440eed891c",
"visible": true
}

View File

@ -4,14 +4,4 @@ if (mouse_check_button(mb_right))
click_slot(global.various_to);
hover = true;
global.selected[dex.dexno] = dexno;
global.selected[dex.pokemon] = pokemon;
global.selected[dex.form] = form;
global.selected[dex.type1] = type1;
global.selected[dex.type2] = type2;
global.selected[dex.sprite] = spr;
global.selected[dex.own] = own;
color = get_color3(own, true);

View File

@ -1,4 +1,3 @@
hover = false;
color = get_color3(own, false);

View File

@ -1,2 +1,2 @@
spr_plus = 1;
spr_plus = 1;

View File

@ -0,0 +1,9 @@
if (hover)
if (mouse_check_button_pressed(mb_left))
if (global.selecting==self && instance_exists(obj_lock))
lock_destroy();
else lock_create(self);
else if (global.selecting == noone)
selected_set(self);

View File

@ -44,6 +44,16 @@
"eventtype": 6,
"m_owner": "3a15f260-5195-42e7-9d02-78cb32aeb14e"
},
{
"id": "53efb9a7-188d-d373-74e4-6d086edf57c7",
"modelName": "GMEvent",
"mvc": "1.0",
"IsDnD": false,
"eventtype": 3,
"enumb": 0,
"collisionObjectId": "00000000-0000-0000-0000-000000000000",
"m_owner": "3a15f260-5195-42e7-9d02-78cb32aeb14e"
},
{
"id": "3ed95a64-01a9-4c50-9feb-0eec25629624",
"modelName": "GMEvent",

View File

@ -1,5 +1,8 @@
///boxes_spawn()
if (file_exists(working_directory+"/_Logs/MissingSprites.log"))
file_delete(working_directory+"/_Logs/MissingSprites.log");
/// SPAWN SLOTS
var pos_x = 0;

View File

@ -13,14 +13,6 @@ global.icon_scale = 2;
global.font = font_add_sprite_ext(spr_font,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZéÉ#-'!?():@_.% /♂♀+", true, 1);
global.selected[dex.dexno] = "001";
global.selected[dex.pokemon] = "BULBASAUR";
global.selected[dex.form] = "";
global.selected[dex.type1] = "Grass";
global.selected[dex.type2] = "Poison";
global.selected[dex.sprite] = -1;
global.selected[dex.own] = 0;
global.dex_len = array_height_2d(global.dexdata);
global.hud_pokemon_rate = 0.225;
@ -31,4 +23,6 @@ global.mouse_y_prev = mouse_x;
global.various = false;
global.various_to = 0;
global.selecting = noone;
enum region { boxes, top, mid_left, mid_right, bottom }

View File

@ -0,0 +1,8 @@
///lock_create(obj_id)
global.selecting = argument0;
selected_set(argument0);
if (!instance_exists(obj_lock))
instance_create_depth(x, y, depth-1, obj_lock)

View File

@ -0,0 +1,8 @@
{
"id": "1c861d7a-eed5-61b7-02f5-201672b6f730",
"modelName": "GMScript",
"mvc": "1.0",
"name": "lock_create",
"IsCompatibility": false,
"IsDnD": false
}

View File

@ -0,0 +1,7 @@
///lock_destroy()
global.selecting = noone;
if (instance_exists(obj_lock))
with (obj_lock)
instance_destroy();

View File

@ -0,0 +1,8 @@
{
"id": "5e879a22-94f8-a47e-fee7-5e134971dd7f",
"modelName": "GMScript",
"mvc": "1.0",
"name": "lock_destroy",
"IsCompatibility": false,
"IsDnD": false
}

View File

@ -0,0 +1,14 @@
///selected_set(_id)
if (argument_count < 1)
var hold = instance_find(obj_slot, 0);
else
var hold = argument[0];
global.selected[dex.dexno] = hold.dexno;
global.selected[dex.pokemon] = hold.pokemon;
global.selected[dex.form] = hold.form;
global.selected[dex.type1] = hold.type1;
global.selected[dex.type2] = hold.type2;
global.selected[dex.sprite] = hold.spr;
global.selected[dex.own] = hold.own;

View File

@ -0,0 +1,8 @@
{
"id": "73ea69de-6c0e-9d8b-6da5-41f465a27cce",
"modelName": "GMScript",
"mvc": "1.0",
"name": "selected_set",
"IsCompatibility": false,
"IsDnD": false
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 B

View File

@ -0,0 +1,92 @@
{
"id": "a96934df-1c09-4a34-875b-89440eed891c",
"modelName": "GMSprite",
"mvc": "1.12",
"name": "spr_lock",
"For3D": false,
"HTile": false,
"VTile": false,
"bbox_bottom": 39,
"bbox_left": 0,
"bbox_right": 39,
"bbox_top": 0,
"bboxmode": 0,
"colkind": 1,
"coltolerance": 0,
"edgeFiltering": false,
"frames": [
{
"id": "420557f1-101c-44c7-89e3-7ecac048f66c",
"modelName": "GMSpriteFrame",
"mvc": "1.0",
"SpriteId": "a96934df-1c09-4a34-875b-89440eed891c",
"compositeImage": {
"id": "d225ca23-f0b3-4434-bb5e-87a8d5de80ba",
"modelName": "GMSpriteImage",
"mvc": "1.0",
"FrameId": "420557f1-101c-44c7-89e3-7ecac048f66c",
"LayerId": "00000000-0000-0000-0000-000000000000"
},
"images": [
{
"id": "9bc43902-f272-4318-9051-f88796a707bb",
"modelName": "GMSpriteImage",
"mvc": "1.0",
"FrameId": "420557f1-101c-44c7-89e3-7ecac048f66c",
"LayerId": "13bc7907-7129-4c5e-b8e0-cf23fbd32a9c"
}
]
},
{
"id": "ce9f08c7-e4bb-4d56-ab46-a260192591fd",
"modelName": "GMSpriteFrame",
"mvc": "1.0",
"SpriteId": "a96934df-1c09-4a34-875b-89440eed891c",
"compositeImage": {
"id": "b26df386-7d94-4cf5-8879-3187447893aa",
"modelName": "GMSpriteImage",
"mvc": "1.0",
"FrameId": "ce9f08c7-e4bb-4d56-ab46-a260192591fd",
"LayerId": "00000000-0000-0000-0000-000000000000"
},
"images": [
{
"id": "d2185fc3-91c2-4513-9e8d-1d77ce7ab469",
"modelName": "GMSpriteImage",
"mvc": "1.0",
"FrameId": "ce9f08c7-e4bb-4d56-ab46-a260192591fd",
"LayerId": "13bc7907-7129-4c5e-b8e0-cf23fbd32a9c"
}
]
}
],
"gridX": 0,
"gridY": 0,
"height": 40,
"layers": [
{
"id": "13bc7907-7129-4c5e-b8e0-cf23fbd32a9c",
"modelName": "GMImageLayer",
"mvc": "1.0",
"SpriteId": "a96934df-1c09-4a34-875b-89440eed891c",
"blendMode": 0,
"isLocked": false,
"name": "default",
"opacity": 100,
"visible": true
}
],
"origin": 0,
"originLocked": false,
"playbackSpeed": 15,
"playbackSpeedType": 0,
"premultiplyAlpha": false,
"sepmasks": false,
"swatchColours": null,
"swfPrecision": 2.525,
"textureGroupId": "1225f6b0-ac20-43bd-a82e-be73fa0b6f4f",
"type": 0,
"width": 40,
"xorig": 0,
"yorig": 0
}

View File

@ -7,7 +7,8 @@
"b5a21a9b-6e2e-40d3-9039-73cd19a7b959",
"3a15f260-5195-42e7-9d02-78cb32aeb14e",
"7cfea35a-80a9-403d-8c4d-28ca4c884ac0",
"b97fbe91-98d6-26ce-4811-7421bc2b6bb3"
"b97fbe91-98d6-26ce-4811-7421bc2b6bb3",
"ff62894e-7035-4e31-b764-10e24aa65d4b"
],
"filterType": "GMObject",
"folderName": "objects",

View File

@ -9,7 +9,8 @@
"40ab7466-64a1-4918-83e3-af5ecc9387bf",
"55447b82-1730-4429-a3f8-d81a83dcacf6",
"2a670a96-e1a6-4311-9e26-be4e482ede89",
"8a784e3d-7846-49be-8f0a-49e04a9f7651"
"8a784e3d-7846-49be-8f0a-49e04a9f7651",
"a96934df-1c09-4a34-875b-89440eed891c"
],
"filterType": "GMSprite",
"folderName": "sprites",

View File

@ -50,7 +50,10 @@
"5c7fb6ce-864a-a30e-f665-d51d74835878",
"6ee30c99-62bc-bcf5-3853-e159533ab6d0",
"9081971b-e1be-521f-34be-38fcfa32f684",
"1087bf1b-acd2-8101-2f92-1c8433c77a66"
"1087bf1b-acd2-8101-2f92-1c8433c77a66",
"73ea69de-6c0e-9d8b-6da5-41f465a27cce",
"1c861d7a-eed5-61b7-02f5-201672b6f730",
"5e879a22-94f8-a47e-fee7-5e134971dd7f"
],
"filterType": "GMScript",
"folderName": "scripts",