A
Anton Provid
Guest
hi, i am working with inventory for my project. got the file inventory extension but it is not working with mouse, that's mean i can not drag and drop item by using mouse (mb_left) ... now, i want change select slot inventory form keyboard_check_pressed(or(“...”)) into using mouse. ex: left mouse select and drag, if over the inventory it will drop items...
here is the the code:
sorry this is the first i make the inventory in game and this is not my code, i just follow this of the tutorial in youtube -i am newbie. I don't know how to that so i need you help me can change it into using mouse. Thank for reading.
here is the the code:
Code:
var down = keyboard_check_pressed(or(“S”));
var up = keyboard_check_pressed(or(“W”));
var left = keyboard_check_pressed(or(“A”));
var right keyboard_check_pressed(or(“D”));
var y_button = gamepad_button_check_pressed(0, gp_face4);
var a_button = gamepad_button_check_pressed(0, gp_face1);
var x_button = gamepad_button_check_pressed(0, gp_face3);
var b_button = gamepad_button_check_pressed(0, gp_face2);
var select = gamepad_button_check_pressed(0,gp_select);
if (up)
{
if (row_y > 0)
{
row_y--;
}
else
{
row_y = row - 1;
}
}
if (down)
{
if (row_y < row - 1)
{
row_y++;
}
else
{
row_y = 0;
}
}
if (left)
{
if (column_x > 0)
{
column_x--;
}
else
{
column_x = column -1;
}
}
if (right)
{
if (column_x < column -1)
{
column_x++;
}
else
{
column_x = 0;
}
}
if (a_button)
{
move_inventory_to_quick_inventory();
}
if (y_button)
{
remove_quick_inventory();
}
if (x_button)
{
combine_items();
}
if (b_button)
{
split_items();
}
if (select)
{
drop_item();
}