K
Krano Network Squirrell
Guest
So I am kinda new to GML and the Logic of how the Code Works. So after I got movement down, I feel the need to try and get this to work.
So what I am trying to get it where when you press a button, then it make the area of 1 (when facing this direction) to set a number from 0 to 1, and that if there is an object in which you can use or pick up in that area, then it would be used or picked up. and that the green area would also be set from 0 to 1, then any special object in there is activated. Here is the code I have for it so far:
So what I am trying to get it where when you press a button, then it make the area of 1 (when facing this direction) to set a number from 0 to 1, and that if there is an object in which you can use or pick up in that area, then it would be used or picked up. and that the green area would also be set from 0 to 1, then any special object in there is activated. Here is the code I have for it so far:
Code:
//animation
if (moveH > 0)
{
sprite_index = spr_neko_walkF
}
if (moveH < 0)
{
sprite_index = spr_neko_walkB
}
if (moveV > 0)
{
sprite_index = spr_neko_walkR
}
if (moveV < 0)
{
sprite_index = spr_neko_walkL
}
if( hsp == 0 && vsp == 0 )
{
image_index = 0
image_speed = 0
}
else
{
image_speed = 1
}
///Interaction
//get inputs
key_use = keyboard_check(ord("E")) || (gamepad_button_check(0, gp_face3)) || keyboard_check(vk_space)
key_pause = keyboard_check(vk_escape) || gamepad_button_check(0, gp_start) || keyboard_check(vk_backspace)
//react to imputs
if
Attachments
-
96.3 KB Views: 60