D
Doooooli
Guest
Hi, so I've run into a small problem, I'm currently making an Inventory system(which is going great) but I'm stuck on the views part! I have an object called obj_select, that looks like an empty box, which is suppose to move around in the inv and select the item we wanna use!
I know I have to use view_xview and view_yview for them too follow my views, but I can't get it to work properly
So first things first!
x=view_xview+495
y=view_yview+600
that is the first script, that puts the obj_select in it's proper position (where the first inv slot is)
So should that be in the create event or Draw begin?
Secondly, I'v tried to put it on different places, and both works in theory, but I wanna be able to move the obj_select around in the inventory ofc! So this is the move code:
It's simple, and I've tried putting view_xview+ infront of all of them, but it does not work!
The problem here is that the obj_select does not follow the screen! It's in it's proper position when I start the game, but when I move a bit so the views starts to kick in it does not follow :/ How would I fix that? thx!
I know I have to use view_xview and view_yview for them too follow my views, but I can't get it to work properly
So first things first!
x=view_xview+495
y=view_yview+600
that is the first script, that puts the obj_select in it's proper position (where the first inv slot is)
So should that be in the create event or Draw begin?
Secondly, I'v tried to put it on different places, and both works in theory, but I wanna be able to move the obj_select around in the inventory ofc! So this is the move code:
Code:
if (gamepad_button_check_released(4,gp_padr))
{
x += 64;
}
if x > 752 && (gamepad_button_check_released(4,gp_padr))
{
x = 495;
}
if (gamepad_button_check_released(4,gp_padl))
{
x -= 64;
}
if x < 495 && (gamepad_button_check_released(4,gp_padl))
{
x = 751;
}
The problem here is that the obj_select does not follow the screen! It's in it's proper position when I start the game, but when I move a bit so the views starts to kick in it does not follow :/ How would I fix that? thx!