Advertisement
Ulabael

invActive

Oct 9th, 2022
1,672
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. В step:
  2.  
  3. if keyboard_check_pressed(vk_tab) {
  4.     invActive = !invActive;
  5.     event_user(3);
  6. }
  7.  
  8. В User event 3:
  9.  
  10. /// @description Обновление инвентаря
  11.  
  12. for (var i = 0; i < array_length(inv); ++i) {
  13.     if (invActive) instance_activate_object(invCells[i]);
  14.     else instance_deactivate_object(invCells[i]);
  15.     invCells[i].obj.id = inv[i].id;
  16.     invCells[i].obj.sprite = inv[i].sprite;
  17.     invCells[i].obj.name = inv[i].name;
  18.     invCells[i].obj.stack = inv[i].stack;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement