OmegaGamingHunters

obj_inventory_create_event_update_1

Oct 2nd, 2019
367
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.69 KB | None | 0 0
  1. /// @description Insert description here
  2. // You can write your code in this editor
  3. event_inherited();
  4.  
  5. global.MaxInventoryItems = 8;
  6. global.CurrentItems = 0;
  7. global.Inventory = ds_grid_create(7, global.MaxInventoryItems);
  8.  
  9. Item_Message = true;
  10. USE_Item = false;
  11. INFO_Item = false;
  12. DROP_Item = false;
  13.  
  14. DoneSpeaking = false; //Checks to see if the NPC is done talking
  15. PortraitState = false; //Checks to see if the text will have a portrait in it
  16. i1 = 0;
  17.  
  18. DialogBoxSprite = spr_dialog_box; //The sprite of the dialog box
  19. DialogBox_X = window_get_width()/2; //The dialog box X position
  20. DialogBox_Y = 395; //The dialog box Y position
  21.  
  22. PortraitSprite_Face = -1; //The portrait sprite itself
  23. PortraitSprite_Talking = -1; //The portrait sprite itself when talking
  24. Portrait_X = DialogBox_X - 215; //The portraits X position
  25. Portrait_Y = DialogBox_Y - 3; //The portraits Y position
  26.  
  27. Text_X = 60; //The text X position
  28. Text_Y = 340; //The text Y position
  29. MaxStringWidth = 600; //Maximum length of each line of text
  30. StringSep = 36; //The seperation between lines of text
  31.  
  32. ItemDialog_USE[0] = global.Inventory[# 4, obj_Overworld_Menu.ItemMenu_Selector_Position]; //Dialog String
  33. ItemDialog_INFO[0] = global.Inventory[# 5, obj_Overworld_Menu.ItemMenu_Selector_Position]; //Dialog String
  34. ItemDialog_DROP[0] = global.Inventory[# 6, obj_Overworld_Menu.ItemMenu_Selector_Position]; //Dialog String
  35.  
  36. Item_String_Display_USE = ItemDialog_USE[0]; //Actual variable used in the Dialog Script
  37. Item_String_Display_INFO = ItemDialog_INFO[0]; //Actual variable used in the Dialog Script
  38. Item_String_Display_DROP = ItemDialog_DROP[0]; //Actual variable used in the Dialog Script
  39.  
  40. enum Items {
  41.     none         = 0,
  42.     MonsterCandy = 1,
  43.     Bandage      = 2,
  44.     Stick        = 3,
  45.     SpiderDonut  = 4,
  46.     SpiderCider  = 5,
  47.     ButterPie    = 6,
  48.     ToyKnife     = 7,
  49.     RedRibbon    = 8,
  50.     height
  51. }
  52.  
  53. enum ItemsType {
  54.     Consumable = 0,
  55.     Weapon     = 1,
  56.     Armor      = 2,
  57.     Key        = 3,
  58.     Other      = 4,
  59.     Nothing    = 5,
  60.     Bandage    = 6
  61. }
  62.  
  63. //global.Inventory[# 0, 0] = Items.MonsterCandy;
  64. //global.Inventory[# 0, 1] = Items.MonsterCandy;
  65. //global.Inventory[# 0, 2] = Items.SpiderDonut;
  66. //global.Inventory[# 0, 3] = Items.SpiderCider;
  67. //global.Inventory[# 0, 4] = Items.ButterPie;
  68. //global.Inventory[# 0, 5] = Items.ToyKnife;
  69. //global.Inventory[# 0, 6] = Items.MonsterCandy;
  70. //global.Inventory[# 0, 7] = Items.RedRibbon;
  71.  
  72. global.Inventory[# 0, 0] = Items.none;
  73. global.Inventory[# 0, 1] = Items.none;
  74. global.Inventory[# 0, 2] = Items.none;
  75. global.Inventory[# 0, 3] = Items.none;
  76. global.Inventory[# 0, 4] = Items.none;
  77. global.Inventory[# 0, 5] = Items.none;
  78. global.Inventory[# 0, 6] = Items.none;
  79. global.Inventory[# 0, 7] = Items.none;
Advertisement
Add Comment
Please, Sign In to add comment