broken i give up, godo time

This commit is contained in:
conzer 2024-12-04 18:41:04 -05:00
parent 8e6135b068
commit a42931099d
6 changed files with 107 additions and 18 deletions

View file

@ -1,9 +1,9 @@
{
"$GMObject":"",
"%Name":"platformer",
"%Name":"obj_grass",
"eventList":[],
"managed":true,
"name":"platformer",
"name":"obj_grass",
"overriddenProperties":[],
"parent":{
"name":"Objects",
@ -26,8 +26,11 @@
"properties":[],
"resourceType":"GMObject",
"resourceVersion":"2.0",
"solid":true,
"spriteId":null,
"solid":false,
"spriteId":{
"name":"grass",
"path":"sprites/grass/grass.yy",
},
"spriteMaskId":null,
"visible":true,
}

View file

@ -1,8 +1,14 @@
/// @DnDAction : YoYo Games.Movement.move_and_collide
/// @DnDAction : YoYo Games.Common.Variable
/// @DnDVersion : 1
/// @DnDHash : 298D9BA3
/// @DnDArgument : "xvel" "2"
/// @DnDArgument : "yvel" "2"
/// @DnDArgument : "object" "platformer"
/// @DnDSaveInfo : "object" "platformer"
move_and_collide(2, 2, platformer,4,0,0,-1,-1);
/// @DnDHash : 44D05B1A
/// @DnDInput : 4
/// @DnDArgument : "expr" "4"
/// @DnDArgument : "expr_1" "16"
/// @DnDArgument : "var" "move_speed"
/// @DnDArgument : "var_1" "jump_speed"
/// @DnDArgument : "var_2" "move_x"
/// @DnDArgument : "var_3" "move_y"
move_speed = 4;
jump_speed = 16;
move_x = 0;
move_y = 0;

79
objects/player/Step_0.gml Normal file
View file

@ -0,0 +1,79 @@
/// @DnDAction : YoYo Games.Common.Variable
/// @DnDVersion : 1
/// @DnDHash : 34BF93A5
/// @DnDInput : 2
/// @DnDArgument : "expr" "keyboard_check(vk_right) - keyboard_check(vk_left)"
/// @DnDArgument : "expr_1" "move_x * move_speed"
/// @DnDArgument : "var" "move_x"
/// @DnDArgument : "var_1" "move_x"
move_x = keyboard_check(vk_right) - keyboard_check(vk_left);
move_x = move_x * move_speed;
/// @DnDAction : YoYo Games.Collisions.If_Object_At
/// @DnDVersion : 1.1
/// @DnDHash : 494A049B
/// @DnDArgument : "x_relative" "1"
/// @DnDArgument : "y" "2"
/// @DnDArgument : "y_relative" "1"
/// @DnDArgument : "object" "obj_grass"
/// @DnDSaveInfo : "object" "obj_grass"
var l494A049B_0 = instance_place(x + 0, y + 2, [obj_grass]); if ((l494A049B_0 > 0)) { /// @DnDAction : YoYo Games.Common.Variable
/// @DnDVersion : 1
/// @DnDHash : 64AD3710
/// @DnDParent : 494A049B
/// @DnDArgument : "var" "move_y"
move_y = 0;
/// @DnDAction : YoYo Games.Mouse & Keyboard.If_Key_Down
/// @DnDVersion : 1
/// @DnDHash : 79991EE3
/// @DnDParent : 494A049B
var l79991EE3_0; l79991EE3_0 = keyboard_check(vk_space); if (l79991EE3_0) { /// @DnDAction : YoYo Games.Common.Variable
/// @DnDVersion : 1
/// @DnDHash : 7E650206
/// @DnDParent : 79991EE3
/// @DnDArgument : "expr" "-jump_speed"
/// @DnDArgument : "var" "move_y"
move_y = -jump_speed; } }
/// @DnDAction : YoYo Games.Common.Else
/// @DnDVersion : 1
/// @DnDHash : 15C6CBAD
else { /// @DnDAction : YoYo Games.Common.If_Variable
/// @DnDVersion : 1
/// @DnDHash : 6AA2EA0B
/// @DnDParent : 15C6CBAD
/// @DnDArgument : "var" "move_y"
/// @DnDArgument : "op" "1"
/// @DnDArgument : "value" "10"
if(move_y < 10) { /// @DnDAction : YoYo Games.Common.Variable
/// @DnDVersion : 1
/// @DnDHash : 458EFD55
/// @DnDParent : 6AA2EA0B
/// @DnDArgument : "expr" "1"
/// @DnDArgument : "var" "move_y"
move_y = 1; } }
/// @DnDAction : YoYo Games.Movement.move_and_collide
/// @DnDVersion : 1
/// @DnDHash : 5E3ED0F6
/// @DnDArgument : "xvel" "move_x"
/// @DnDArgument : "yvel" "move_y"
/// @DnDArgument : "maxxmove" "0"
/// @DnDArgument : "maxymove" "0"
/// @DnDArgument : "object" "obj_grass"
/// @DnDSaveInfo : "object" "obj_grass"
move_and_collide(move_x, move_y, obj_grass,4,0,0,0,0);
/// @DnDAction : YoYo Games.Common.If_Variable
/// @DnDVersion : 1
/// @DnDHash : 5A51BEC1
/// @DnDArgument : "var" "move_x"
/// @DnDArgument : "not" "1"
if(!(move_x == 0)) { /// @DnDAction : YoYo Games.Common.Variable
/// @DnDVersion : 1
/// @DnDHash : 38DDDEF6
/// @DnDParent : 5A51BEC1
/// @DnDArgument : "expr" "sign(move_x)"
/// @DnDArgument : "var" "image_xscale"
image_xscale = sign(move_x); }

View file

@ -3,6 +3,7 @@
"%Name":"player",
"eventList":[
{"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":0,"isDnD":true,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
{"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":3,"isDnD":true,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
],
"managed":true,
"name":"player",