added floating options

This commit is contained in:
magicalfeyfenny 2021-06-06 04:19:04 -04:00
parent 592e0fd9cb
commit 7209fc19a8
13 changed files with 164 additions and 6 deletions

View File

@ -7,7 +7,7 @@ actor_left = "";
actor_left_emote = EMOTE_NEUTRAL;
actor_right = "";
actor_right_emote = EMOTE_NEUTRAL;
last_active = LEFT;
last_active = LEFT_ACTOR;
text_advance_ready = TEXT_LOADING;
name_test = ds_queue_create();

View File

@ -12,7 +12,7 @@ if (dialogue_mode) {
//TODO: Draw current active character's name
draw_set_alpha(1);
if ( last_active == LEFT ) {
if ( last_active == LEFT_ACTOR ) {
draw_set_alpha(.5);
}
draw_set_halign( fa_right );
@ -20,7 +20,7 @@ if (dialogue_mode) {
draw_set_halign( fa_left );
draw_set_alpha(1);
if ( last_active == RIGHT ) {
if ( last_active == RIGHT_ACTOR ) {
draw_set_alpha(.5);
}
draw_text( 128, 640, actor_left );

View File

@ -0,0 +1,4 @@
side_modifier = 0;
x_target = obj_wriggle.x + ( obj_wriggle.face_dir * OPTION_FORWARD );
y_target = obj_wriggle.y + (side_modifier * OPTION_SIDE_UNFOC);

View File

@ -0,0 +1 @@
draw_sprite_ext( spr_options, image_index, x, y, obj_wriggle.face_dir, 1, 0, c_white, .75 );

View File

@ -0,0 +1,15 @@
if ( keyboard_check( vk_shift ) ) {
x_target = obj_wriggle.x + ( obj_wriggle.face_dir * OPTION_FORWARD );
y_target = obj_wriggle.y + ( side_modifier * OPTION_SIDE_FOCUS );
} else {
x_target = obj_wriggle.x;
y_target = obj_wriggle.y + ( side_modifier * OPTION_SIDE_UNFOC );
}
if ( point_distance(x, y, x_target, y_target) >= 6 ) {
move_towards_point( x_target, y_target, 5 );
} else {
x = x_target;
y = y_target;
}

View File

@ -0,0 +1,38 @@
{
"spriteId": {
"name": "spr_options",
"path": "sprites/spr_options/spr_options.yy",
},
"solid": false,
"visible": true,
"spriteMaskId": null,
"persistent": false,
"parentObjectId": null,
"physicsObject": false,
"physicsSensor": false,
"physicsShape": 1,
"physicsGroup": 1,
"physicsDensity": 0.5,
"physicsRestitution": 0.1,
"physicsLinearDamping": 0.1,
"physicsAngularDamping": 0.1,
"physicsFriction": 0.2,
"physicsStartAwake": true,
"physicsKinematic": false,
"physicsShapePoints": [],
"eventList": [
{"isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",},
{"isDnD":false,"eventNum":0,"eventType":3,"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": [],
"parent": {
"name": "thpj3",
"path": "thpj3.yyp",
},
"resourceVersion": "1.0",
"name": "obj_options",
"tags": [],
"resourceType": "GMObject",
}

View File

@ -12,4 +12,14 @@ emergency = 0;
hyper_time = 0;
hyper_tier = 0;
h_move = 0;
v_move = 0;
v_move = 0;
var top_option = instance_create_layer(x,y,"Instances", obj_options);
with (top_option) {
side_modifier = TOP;
}
var bottom_option = instance_create_layer(x,y,"Instances", obj_options);
with (bottom_option) {
side_modifier = BOTTOM;
}

View File

@ -1,4 +1,4 @@
draw_sprite_ext( spr_wriggle, image_index, x, y, -1 + (2 * face_dir), 1, 0, c_white, 1 * ( max( 1, recovery ) % 3 ) );
draw_sprite_ext( spr_wriggle, image_index, x, y, face_dir, 1, 0, c_white, 1 * ( max( 1, recovery ) % 3 ) );
draw_sprite_ext( spr_wriggle_hitbox, 0, x, y, 2, 2, hitbox_rotator, c_white, .75);
draw_sprite_ext( spr_wriggle_hitbox, 0, x, y, 1, 1, -hitbox_rotator, c_white, 1);

View File

@ -10,9 +10,14 @@
#macro EMOTE_CONFUSED 3
#macro EMOTE_ANGRY 4
#macro EMOTE_OUCH 5
#macro LEFT_ACTOR 0
#macro RIGHT_ACTOR 1
#macro LEFT 0
#macro LEFT -1
#macro RIGHT 1
#macro TOP -1
#macro BOTTOM 1
#macro LIVES_INIT 3
#macro LIVES_MAX 5
#macro BOMBS_INIT 3
@ -34,6 +39,10 @@
#macro BOUNDARY_TOP 32
#macro BOUNDARY_BOTTOM 688
#macro OPTION_FORWARD 100
#macro OPTION_SIDE_UNFOC 100
#macro OPTION_SIDE_FOCUS 20
function scr_initialize() {

Binary file not shown.

After

Width:  |  Height:  |  Size: 437 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 437 B

View File

@ -0,0 +1,79 @@
{
"bboxMode": 0,
"collisionKind": 1,
"type": 0,
"origin": 4,
"preMultiplyAlpha": false,
"edgeFiltering": false,
"collisionTolerance": 0,
"swfPrecision": 2.525,
"bbox_left": 12,
"bbox_right": 55,
"bbox_top": 10,
"bbox_bottom": 40,
"HTile": false,
"VTile": false,
"For3D": false,
"width": 64,
"height": 64,
"textureGroupId": {
"name": "Default",
"path": "texturegroups/Default",
},
"swatchColours": null,
"gridX": 0,
"gridY": 0,
"frames": [
{"compositeImage":{"FrameId":{"name":"39de23b4-27b9-462d-acbd-f1a6493218b2","path":"sprites/spr_options/spr_options.yy",},"LayerId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMSpriteBitmap",},"images":[
{"FrameId":{"name":"39de23b4-27b9-462d-acbd-f1a6493218b2","path":"sprites/spr_options/spr_options.yy",},"LayerId":{"name":"4750d189-0884-4788-a56a-7d940354fd1b","path":"sprites/spr_options/spr_options.yy",},"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMSpriteBitmap",},
],"parent":{"name":"spr_options","path":"sprites/spr_options/spr_options.yy",},"resourceVersion":"1.0","name":"39de23b4-27b9-462d-acbd-f1a6493218b2","tags":[],"resourceType":"GMSpriteFrame",},
],
"sequence": {
"spriteId": {"name":"spr_options","path":"sprites/spr_options/spr_options.yy",},
"timeUnits": 1,
"playback": 1,
"playbackSpeed": 30.0,
"playbackSpeedType": 0,
"autoRecord": true,
"volume": 1.0,
"length": 1.0,
"events": {"Keyframes":[],"resourceVersion":"1.0","resourceType":"KeyframeStore<MessageEventKeyframe>",},
"moments": {"Keyframes":[],"resourceVersion":"1.0","resourceType":"KeyframeStore<MomentsEventKeyframe>",},
"tracks": [
{"name":"frames","spriteId":null,"keyframes":{"Keyframes":[
{"id":"d83fd73a-53b9-44b5-8d66-86237a6a12dc","Key":0.0,"Length":1.0,"Stretch":false,"Disabled":false,"IsCreationKey":false,"Channels":{"0":{"Id":{"name":"39de23b4-27b9-462d-acbd-f1a6493218b2","path":"sprites/spr_options/spr_options.yy",},"resourceVersion":"1.0","resourceType":"SpriteFrameKeyframe",},},"resourceVersion":"1.0","resourceType":"Keyframe<SpriteFrameKeyframe>",},
],"resourceVersion":"1.0","resourceType":"KeyframeStore<SpriteFrameKeyframe>",},"trackColour":0,"inheritsTrackColour":true,"builtinName":0,"traits":0,"interpolation":1,"tracks":[],"events":[],"modifiers":[],"isCreationTrack":false,"resourceVersion":"1.0","tags":[],"resourceType":"GMSpriteFramesTrack",},
],
"visibleRange": null,
"lockOrigin": false,
"showBackdrop": true,
"showBackdropImage": false,
"backdropImagePath": "",
"backdropImageOpacity": 0.5,
"backdropWidth": 1366,
"backdropHeight": 768,
"backdropXOffset": 0.0,
"backdropYOffset": 0.0,
"xorigin": 32,
"yorigin": 32,
"eventToFunction": {},
"eventStubScript": null,
"parent": {"name":"spr_options","path":"sprites/spr_options/spr_options.yy",},
"resourceVersion": "1.3",
"name": "spr_options",
"tags": [],
"resourceType": "GMSequence",
},
"layers": [
{"visible":true,"isLocked":false,"blendMode":0,"opacity":100.0,"displayName":"default","resourceVersion":"1.0","name":"4750d189-0884-4788-a56a-7d940354fd1b","tags":[],"resourceType":"GMImageLayer",},
],
"nineSlice": null,
"parent": {
"name": "thpj3",
"path": "thpj3.yyp",
},
"resourceVersion": "1.0",
"name": "spr_options",
"tags": [],
"resourceType": "GMSprite",
}

View File

@ -2,12 +2,14 @@
"resources": [
{"id":{"name":"fn_disclaimer","path":"fonts/fn_disclaimer/fn_disclaimer.yy",},"order":1,},
{"id":{"name":"fn_title_text","path":"fonts/fn_title_text/fn_title_text.yy",},"order":0,},
{"id":{"name":"obj_options","path":"objects/obj_options/obj_options.yy",},"order":15,},
{"id":{"name":"obj_disclaimer","path":"objects/obj_disclaimer/obj_disclaimer.yy",},"order":2,},
{"id":{"name":"spr_wriggle_hitbox","path":"sprites/spr_wriggle_hitbox/spr_wriggle_hitbox.yy",},"order":9,},
{"id":{"name":"obj_title_moon","path":"objects/obj_title_moon/obj_title_moon.yy",},"order":1,},
{"id":{"name":"spr_title_star","path":"sprites/spr_title_star/spr_title_star.yy",},"order":7,},
{"id":{"name":"scr_dialogue_start","path":"scripts/scr_dialogue_start/scr_dialogue_start.yy",},"order":10,},
{"id":{"name":"rm_disclaimer","path":"rooms/rm_disclaimer/rm_disclaimer.yy",},"order":3,},
{"id":{"name":"spr_options","path":"sprites/spr_options/spr_options.yy",},"order":16,},
{"id":{"name":"obj_title_text","path":"objects/obj_title_text/obj_title_text.yy",},"order":3,},
{"id":{"name":"obj_wriggle","path":"objects/obj_wriggle/obj_wriggle.yy",},"order":11,},
{"id":{"name":"spr_title_bg","path":"sprites/spr_title_bg/spr_title_bg.yy",},"order":5,},