Jump to content


Photo
- - - - -

Inventory, Equipment,Enchanting & Loot Example


  • Please log in to reply
61 replies to this topic

#1 loverock125

loverock125

    GMC Member

  • GMC Member
  • 1616 posts
  • Version:GM8

Posted 25 August 2010 - 02:50 AM

  • Title: Inventory, Equipment, Enchanting & Loot example
  • Description: This is an example that contains an inventory,equipment panel,enchanting panel and a loot box.
  • GM Version: 8
  • Registered: No
  • File Type: gmk
  • File Size: 422KB
  • File Link:http://www.host-a.net/u/orestis125/Inventory%201.6.1.gm81

Screenshot:
Screenshot Link

Additional Info:
* You can easily change all the sprites/texts, shop/inventory slots, sounds, and easily add more items and stats.
* If you want to use this in 3d mode then execute the script d2d_settings() at the start of every draw event and d3d_settings at the end of the draw event. This must be done on the objects oItems,oInventory,oLoot_Box,oEnchant_Window,oEquipment.

About this example
This is an example that includes a typical RPG Inventory, a Shop,a loot box and an Equipment panel with stats similar to those of MMORPG games and an enchanting window. The inventory, the loot box and the equipment panel can be dragged like windows.

Help modifying
All of the variables that you will most likely want to modify are commented enough to let you know what each variable does. However
here's a txt file including help if you are having problems:
Txt Variable Help File


I'll be more than happy to help you if you need any help. Just say the word.
Please tell me if you encounter any bugs, tell me if you like this and feedback is always welcome.

If used in your game then please credit goes on Orestis Pavlides since I'm using this officially for a contest,
Thank you :)


Version 1.6:
* Replaced many loops with faster alternatives.
* Added a variable global.main_item which has the value of the id of the item that is equipped in the main hand.
Use it to find min and max damage of the weapon. (global.offhand_item already exists)

Version 1.6.1:
* Fixed some bugs which people mentioned. Thank you again.

Edited by loverock125, 29 August 2011 - 11:48 AM.

  • 1

#2 Suffrin

Suffrin

    GMC Member

  • New Member
  • 2 posts

Posted 26 August 2010 - 01:03 AM

Dude this is amazing.
  • 0

#3 Nubcake

Nubcake

    Nubcake

  • GMC Member
  • 1295 posts
  • Version:Unknown

Posted 26 August 2010 - 02:40 AM

Wow this is an amoazing inventory :P however that sure is a lot of scripts!
  • 0

#4 NoobScratcher

NoobScratcher

    GMC Member

  • New Member
  • 132 posts

Posted 26 August 2010 - 02:44 AM

very awesome and world of warcraft like nice concept design too :D il defently use this in my game if it easily configurable and works a treat :P how would i implement this into a ui on a 3d first person action adventure game ? if anyone could provide an easy simple method and how would i get it to actually show sprites when i put an item onto the character ? :) in the first person view sorta like how when you pick a gun in doom it changes the hands of the character to holding the gun picked up but mine would show the armour which is on the characters hand and being and to be able to be animated from that point on! Excellent Job!!!

Edited by NoobScratcher, 26 August 2010 - 04:48 AM.

  • 0

#5 loverock125

loverock125

    GMC Member

  • GMC Member
  • 1616 posts
  • Version:GM8

Posted 26 August 2010 - 07:47 AM

Dude this is amazing.


Wow this is an amoazing inventory however that sure is a lot of scripts!


Thank you both for the replies, I'm glad you find it amazing :)
@Nubcake yes there are many scripts, it was kinda annoying when I had to find one and edit it (hehe) but after
someone implements this in his game then he can just put all scripts in a folder. Tell me if you need
help implementing it.

very awesome and world of warcraft like nice concept design too il defently use this in my game if it easily configurable and works a treat how would i implement this into a ui on a 3d first person action adventure game ? if anyone could provide an easy simple method and how would i get it to actually show sprites when i put an item onto the character ? in the first person view sorta like how when you pick a gun in doom it changes the hands of the character to holding the gun picked up but mine would show the armour which is on the characters hand and being and to be able to be animated from that point on! Excellent Job!!!


Thank you too for the reply and the nice comments. I am afraid that I am not very familiar with 3D, i started reading tutorials and trying to learn from examples a few days ago. If nobody helps you in this topic then just start a new one. I'm sure there are many 3D users out there that
can help you :)

I'll try to read more tutorials today and see if i can help you with your question.

Thanks again everyone :)
  • 0

#6 NoobScratcher

NoobScratcher

    GMC Member

  • New Member
  • 132 posts

Posted 26 August 2010 - 12:35 PM


Dude this is amazing.


Wow this is an amoazing inventory however that sure is a lot of scripts!


Thank you both for the replies, I'm glad you find it amazing :)
@Nubcake yes there are many scripts, it was kinda annoying when I had to find one and edit it (hehe) but after
someone implements this in his game then he can just put all scripts in a folder. Tell me if you need
help implementing it.

very awesome and world of warcraft like nice concept design too il defently use this in my game if it easily configurable and works a treat how would i implement this into a ui on a 3d first person action adventure game ? if anyone could provide an easy simple method and how would i get it to actually show sprites when i put an item onto the character ? in the first person view sorta like how when you pick a gun in doom it changes the hands of the character to holding the gun picked up but mine would show the armour which is on the characters hand and being and to be able to be animated from that point on! Excellent Job!!!


Thank you too for the reply and the nice comments. I am afraid that I am not very familiar with 3D, i started reading tutorials and trying to learn from examples a few days ago. If nobody helps you in this topic then just start a new one. I'm sure there are many 3D users out there that
can help you :)

I'll try to read more tutorials today and see if i can help you with your question.

Thanks again everyone :)




Awesome Sauce i look forward to hearing from you :)


  • 0

#7 Bjornacorn

Bjornacorn

    World of Warcraft

  • New Member
  • 197 posts

Posted 26 August 2010 - 10:54 PM

Wow, that's a lot of scripts. Great work though. I'm getting the impression that you were trying to come up with a loot/inventory system from World of Warcraft. :lol:
  • 0

#8 CrazyGamer

CrazyGamer

    GMC Member

  • GMC Member
  • 81 posts

Posted 26 August 2010 - 11:30 PM

Thas an cool inventory but i found 2 bugs.
1) This may be happening only for me - when you click the spot were you click will not be the same with the mouse x,y
2) If you have an item in a cell and put other item over it it will overlap and the old item will disappear.
Anything else is fine.
Regards CrazyGamer.
  • 0

#9 loverock125

loverock125

    GMC Member

  • GMC Member
  • 1616 posts
  • Version:GM8

Posted 27 August 2010 - 08:53 AM

Wow, that's a lot of scripts. Great work though. I'm getting the impression that you were trying to come up with a loot/inventory system from World of Warcraft. :lol:


Thank you for the reply and the nice comments. Hehe maybe i was :P

Thas an cool inventory but i found 2 bugs.
1) This may be happening only for me - when you click the spot were you click will not be the same with the mouse x,y
2) If you have an item in a cell and put other item over it it will overlap and the old item will disappear.
Anything else is fine.
Regards CrazyGamer.



Thank you for the reply. For the first bug you need set the view according to your monitors resolution. The second bug i am afraid it's only happening to you. I can't see why it's happening, I've downloaded it myself and it works like a charm.

Thanks again though.

Edited by loverock125, 27 August 2010 - 08:54 AM.

  • 0

#10 njp

njp

    Panda

  • GMC Member
  • 2325 posts
  • Version:GM8

Posted 27 August 2010 - 12:27 PM

This is very well made, very good job. You put alot of work into this and for that you get a 9/10
also please dont ever use shift in a game, sticky keys are the most annoying thing about windows.

all the best,
nic
  • 0

#11 loverock125

loverock125

    GMC Member

  • GMC Member
  • 1616 posts
  • Version:GM8

Posted 27 August 2010 - 03:42 PM

This is very well made, very good job. You put alot of work into this and for that you get a 9/10
also please dont ever use shift in a game, sticky keys are the most annoying thing about windows.

all the best,
nic


Thank you for the reply and the nice comments Nic. You're right, sticky keys are really annoying and I should change the shift key.
Thanks again :)

Edited by loverock125, 27 August 2010 - 03:42 PM.

  • 0

#12 NoobScratcher

NoobScratcher

    GMC Member

  • New Member
  • 132 posts

Posted 27 August 2010 - 04:28 PM

i tryed putting it in my game some of its working but theres still some things i cant figure out can you help ? :)
___________________________________________
ERROR in
action number 1
of Create Event
for object oPlayer:

Error in code at line 127:
repeat(global.max_level)
^
at position 16: Unknown variable max_level

___________________________________________
ERROR in
action number 1
of Create Event
for object oLoot_box:

In script make_panel_active:
Error in code at line 1:
if global.active=argument0 then {exit;}with (argument0){var i;i=get_other_active_panel(global.active,id)if i!=0 then {i.depth_num=0;}global.active.depth_num=1;global.active=id;depth_num=0}
^
at position 11: Unknown variable active

___________________________________________
ERROR in
action number 1
of Create Event
for object oitems:

Error in code at line 78:
dragging_depth=-150+global.interface_depth
^
at position 29: Unknown variable interface_depth

___________________________________________
ERROR in
action number 1
of Create Event
for object oEquipment:

Error in code at line 25:
eq_back_spr=sEq_Back
^
at position 14: Unknown variable sEq_Back

___________________________________________
ERROR in
action number 1
of Draw Event
for object oitems:

Error in code at line 11:
if slot[0]=-1 and slot[1]=-1 then
^
at position 5: Unknown variable slot

___________________________________________
ERROR in
action number 1
of Draw Event
for object oInventory:

Error in code at line 39:
if inv_title[9]!=0 and over_inv_tab=true and (global.active=id or not_above_other()=true or (not_above("",global.active)=true and depth_num=1)) then {draw_set_color(inv_title[9]);}
^
at position 55: Unknown variable active

___________________________________________
ERROR in
action number 1
of Draw Event
for object oEquipment:

Error in code at line 22:
if over_bar=true and (global.active=id or not_above_other()=true) then {draw_set_color(eq_title[9]);}
^
at position 31: Unknown variable active

___________________________________________
ERROR in
action number 1
of Begin Step Event
for object oEquipment:

Error in code at line 1:
if global.active=id then {depth=global.active_depth;} else {depth=global.inactive_depth-depth_num*2;}
^
at position 11: Unknown variable active

___________________________________________
ERROR in
action number 1
of Begin Step Event
for object oLoot_box:

Error in code at line 5:
if global.active!=id and (over_bar=true or over_loot=true) and mouse_check_button_pressed(mb_left) and (not_above_other()=true or (not_above("",global.active)=true and depth_num=1)) then
^
at position 12: Unknown variable active

___________________________________________
ERROR in
action number 1
of Step Event
for object oInventory:

Error in code at line 1:
if global.active!=id and (over_inventory_back=true or over_inv_tab=true) and mouse_check_button_pressed(mb_left) and (not_above_other()=true or (not_above("",global.active)=true and depth_num=1)) then
^
at position 11: Unknown variable active

___________________________________________
ERROR in
action number 1
of Step Event
for object oitems:

Error in code at line 3:
if dragging=true then
^
at position 5: Unknown variable dragging

___________________________________________
ERROR in
action number 1
of End Step Event
for object oEquipment:

Error in code at line 1:
if global.active!=id and (over_bar=true or over_eq=true) and mouse_check_button_pressed(mb_left) and (not_above_other()=true or (not_above("",global.active)=true and depth_num=1)) then
^
at position 11: Unknown variable active

___________________________________________
ERROR in
action number 1
of End Step Event
for object oLoot_box:

Error in code at line 7:
loot_height=loot_box_items*(loot_items_space+sprite_get_height(oItems.spr_back))+loot_items_start_y_space
^
at position 65: Unknown variable oItems

___________________________________________
ERROR in
action number 1
of Draw Event
for object oitems:

Error in code at line 11:
if slot[0]=-1 and slot[1]=-1 then
^
at position 5: Unknown variable slot

___________________________________________
ERROR in
action number 1
of Draw Event
for object oInventory:

Error in code at line 39:
if inv_title[9]!=0 and over_inv_tab=true and (global.active=id or not_above_other()=true or (not_above("",global.active)=true and depth_num=1)) then {draw_set_color(inv_title[9]);}
^
at position 55: Unknown variable active

___________________________________________
ERROR in
action number 1
of Draw Event
for object oEquipment:

Error in code at line 22:
if over_bar=true and (global.active=id or not_above_other()=true) then {draw_set_color(eq_title[9]);}
^
at position 31: Unknown variable active

___________________________________________
ERROR in
action number 1
of Begin Step Event
for object oEquipment:

Error in code at line 1:
if global.active=id then {depth=global.active_depth;} else {depth=global.inactive_depth-depth_num*2;}
^
at position 11: Unknown variable active

___________________________________________
ERROR in
action number 1
of Begin Step Event
for object oLoot_box:

Error in code at line 5:
if global.active!=id and (over_bar=true or over_loot=true) and mouse_check_button_pressed(mb_left) and (not_above_other()=true or (not_above("",global.active)=true and depth_num=1)) then
^
at position 12: Unknown variable active

___________________________________________
ERROR in
action number 1
of Step Event
for object oInventory:

Error in code at line 1:
if global.active!=id and (over_inventory_back=true or over_inv_tab=true) and mouse_check_button_pressed(mb_left) and (not_above_other()=true or (not_above("",global.active)=true and depth_num=1)) then
^
at position 11: Unknown variable active
  • 0

#13 loverock125

loverock125

    GMC Member

  • GMC Member
  • 1616 posts
  • Version:GM8

Posted 27 August 2010 - 05:03 PM

i tryed putting it in my game some of its working but theres still some things i cant figure out can you help ? :)


Thank you for posting the errors, I've just updated the main post with a list on what to do to avoid the errors. Please update your game and let me know.

Thanks again and good luck :)
  • 0

#14 NoobScratcher

NoobScratcher

    GMC Member

  • New Member
  • 132 posts

Posted 27 August 2010 - 06:54 PM

________________i fixed the errors i hope but_here are some more errors sorry if there spammed or reposts errors i just copy and pasted the ingame code thing so lol soz :)___________________
ERROR in
action number 1
of Create Event
for object oLoot_box:

In script make_panel_active:
In script get_other_active_panel:
Error in code at line 1:
if !instance_exists(oEquipment) or !instance_exists(oLoot_Box) then {return(0);}var panel_1,panel_2,is_loot,is_eq,is_inv;panel_1=argument0panel_2=argument1is_loot=true;is_eq=true;is_inv=true;if panel_1=oLoot_Box.id or panel_2=oLoot_Box.id then {is_loot=false;}if panel_1=oInventory.id or panel_2=oInventory.id then {is_inv=false;}if panel_1=oEquipment.id or panel_2=oEquipment.id then {is_eq=false;}if is_loot=true then {return(oLoot_Box.id);}if is_eq=true then {return(oEquipment.id);}if is_inv=true then {return(oInventory.id);}
^
at position 53: Unknown variable oLoot_Box

___________________________________________
ERROR in
action number 1
of Create Event
for object oEquipment:

Error in code at line 58:
slot_spr=sEq_Slot
^
at position 11: Unknown variable sEq_Slot

___________________________________________
ERROR in
action number 1
of Draw Event
for object oitems:

In script not_above_other:
Error in code at line 5:
var i;i=idif argument0!=0 then {i=argument0;}if i=oLoot_Box.id{if not_above("Inventory") and not_above("Equipment") and not_above("Enchant") then{return(true);}}else if i=oInventory.id{if not_above("Loot") and not_above("Equipment") and not_above("Enchant") then{return(true);}}else if i=oEquipment.id{if not_above("Loot") and not_above("Inventory")and not_above("Enchant") then{return(true);}}else if i=oEnchant_Window.id {if not_above("Loot") and not_above("Inventory") and not_above("Equipment") then{return(true);}}return(false);
^
at position 6: Unknown variable oLoot_Box

___________________________________________
ERROR in
action number 1
of Draw Event
for object oInventory:

In script not_above_other:
Error in code at line 5:
var i;i=idif argument0!=0 then {i=argument0;}if i=oLoot_Box.id{if not_above("Inventory") and not_above("Equipment") and not_above("Enchant") then{return(true);}}else if i=oInventory.id{if not_above("Loot") and not_above("Equipment") and not_above("Enchant") then{return(true);}}else if i=oEquipment.id{if not_above("Loot") and not_above("Inventory")and not_above("Enchant") then{return(true);}}else if i=oEnchant_Window.id {if not_above("Loot") and not_above("Inventory") and not_above("Equipment") then{return(true);}}return(false);
^
at position 6: Unknown variable oLoot_Box

___________________________________________
ERROR in
action number 1
of Draw Event
for object oEquipment:

In script not_above_other:
Error in code at line 5:
var i;i=idif argument0!=0 then {i=argument0;}if i=oLoot_Box.id{if not_above("Inventory") and not_above("Equipment") and not_above("Enchant") then{return(true);}}else if i=oInventory.id{if not_above("Loot") and not_above("Equipment") and not_above("Enchant") then{return(true);}}else if i=oEquipment.id{if not_above("Loot") and not_above("Inventory")and not_above("Enchant") then{return(true);}}else if i=oEnchant_Window.id {if not_above("Loot") and not_above("Inventory") and not_above("Equipment") then{return(true);}}return(false);
^
at position 6: Unknown variable oLoot_Box

___________________________________________
ERROR in
action number 1
of Begin Step Event
for object oEquipment:

Error in code at line 1:
if global.active=id then {depth=global.active_depth;} else {depth=global.inactive_depth-depth_num*2;}
^
at position 89: Unknown variable depth_num

___________________________________________
ERROR in
action number 1
of Begin Step Event
for object oLoot_box:

In script not_above_other:
Error in code at line 5:
var i;i=idif argument0!=0 then {i=argument0;}if i=oLoot_Box.id{if not_above("Inventory") and not_above("Equipment") and not_above("Enchant") then{return(true);}}else if i=oInventory.id{if not_above("Loot") and not_above("Equipment") and not_above("Enchant") then{return(true);}}else if i=oEquipment.id{if not_above("Loot") and not_above("Inventory")and not_above("Enchant") then{return(true);}}else if i=oEnchant_Window.id {if not_above("Loot") and not_above("Inventory") and not_above("Equipment") then{return(true);}}return(false);
^
at position 6: Unknown variable oLoot_Box

___________________________________________
ERROR in
action number 1
of Step Event
for object oInventory:

In script not_above_other:
Error in code at line 5:
var i;i=idif argument0!=0 then {i=argument0;}if i=oLoot_Box.id{if not_above("Inventory") and not_above("Equipment") and not_above("Enchant") then{return(true);}}else if i=oInventory.id{if not_above("Loot") and not_above("Equipment") and not_above("Enchant") then{return(true);}}else if i=oEquipment.id{if not_above("Loot") and not_above("Inventory")and not_above("Enchant") then{return(true);}}else if i=oEnchant_Window.id {if not_above("Loot") and not_above("Inventory") and not_above("Equipment") then{return(true);}}return(false);
^
at position 6: Unknown variable oLoot_Box

___________________________________________
ERROR in
action number 1
of End Step Event
for object oEquipment:

Error in code at line 1:
if global.active!=id and (over_bar=true or over_eq=true) and mouse_check_button_pressed(mb_left) and (not_above_other()=true or (not_above("",global.active)=true and depth_num=1)) then
^
at position 44: Unknown variable over_eq

___________________________________________
ERROR in
action number 1
of End Step Event
for object oLoot_box:

Error in code at line 7:
loot_height=loot_box_items*(loot_items_space+sprite_get_height(oItems.spr_back))+loot_items_start_y_space
^
at position 65: Unknown variable oItems

___________________________________________
ERROR in
action number 1
of Draw Event
for object oInventory:

In script not_above_other:
Error in code at line 5:
var i;i=idif argument0!=0 then {i=argument0;}if i=oLoot_Box.id{if not_above("Inventory") and not_above("Equipment") and not_above("Enchant") then{return(true);}}else if i=oInventory.id{if not_above("Loot") and not_above("Equipment") and not_above("Enchant") then{return(true);}}else if i=oEquipment.id{if not_above("Loot") and not_above("Inventory")and not_above("Enchant") then{return(true);}}else if i=oEnchant_Window.id {if not_above("Loot") and not_above("Inventory") and not_above("Equipment") then{return(true);}}return(false);
^
at position 6: Unknown variable oLoot_Box

___________________________________________
ERROR in
action number 1
of Draw Event
for object oEquipment:

In script not_above_other:
Error in code at line 5:
var i;i=idif argument0!=0 then {i=argument0;}if i=oLoot_Box.id{if not_above("Inventory") and not_above("Equipment") and not_above("Enchant") then{return(true);}}else if i=oInventory.id{if not_above("Loot") and not_above("Equipment") and not_above("Enchant") then{return(true);}}else if i=oEquipment.id{if not_above("Loot") and not_above("Inventory")and not_above("Enchant") then{return(true);}}else if i=oEnchant_Window.id {if not_above("Loot") and not_above("Inventory") and not_above("Equipment") then{return(true);}}return(false);
^
at position 6: Unknown variable oLoot_Box

___________________________________________
ERROR in
action number 1
of Draw Event
for object oitems:

In script not_above_other:
Error in code at line 5:
var i;i=idif argument0!=0 then {i=argument0;}if i=oLoot_Box.id{if not_above("Inventory") and not_above("Equipment") and not_above("Enchant") then{return(true);}}else if i=oInventory.id{if not_above("Loot") and not_above("Equipment") and not_above("Enchant") then{return(true);}}else if i=oEquipment.id{if not_above("Loot") and not_above("Inventory")and not_above("Enchant") then{return(true);}}else if i=oEnchant_Window.id {if not_above("Loot") and not_above("Inventory") and not_above("Equipment") then{return(true);}}return(false);
^
at position 6: Unknown variable oLoot_Box

___________________________________________
ERROR in
action number 1
of Begin Step Event
for object oEquipment:

Error in code at line 1:
if global.active=id then {depth=global.active_depth;} else {depth=global.inactive_depth-depth_num*2;}
^
at position 89: Unknown variable depth_num

___________________________________________
ERROR in
action number 1
of Begin Step Event
for object oLoot_box:

In script not_above_other:
Error in code at line 5:
var i;i=idif argument0!=0 then {i=argument0;}if i=oLoot_Box.id{if not_above("Inventory") and not_above("Equipment") and not_above("Enchant") then{return(true);}}else if i=oInventory.id{if not_above("Loot") and not_above("Equipment") and not_above("Enchant") then{return(true);}}else if i=oEquipment.id{if not_above("Loot") and not_above("Inventory")and not_above("Enchant") then{return(true);}}else if i=oEnchant_Window.id {if not_above("Loot") and not_above("Inventory") and not_above("Equipment") then{return(true);}}return(false);
^
at position 6: Unknown variable oLoot_Box

___________________________________________
ERROR in
action number 1
of Step Event
for object oInventory:

In script not_above_other:
Error in code at line 5:
var i;i=idif argument0!=0 then {i=argument0;}if i=oLoot_Box.id{if not_above("Inventory") and not_above("Equipment") and not_above("Enchant") then{return(true);}}else if i=oInventory.id{if not_above("Loot") and not_above("Equipment") and not_above("Enchant") then{return(true);}}else if i=oEquipment.id{if not_above("Loot") and not_above("Inventory")and not_above("Enchant") then{return(true);}}else if i=oEnchant_Window.id {if not_above("Loot") and not_above("Inventory") and not_above("Equipment") then{return(true);}}return(false);
^
at position 6: Unknown variable oLoot_Box

___________________________________________
ERROR in
action number 1
of End Step Event
for object oEquipment:

Error in code at line 1:
if global.active!=id and (over_bar=true or over_eq=true) and mouse_check_button_pressed(mb_left) and (not_above_other()=true or (not_above("",global.active)=true and depth_num=1)) then
^
at position 44: Unknown variable over_eq

___________________________________________
ERROR in
action number 1
of End Step Event
for object oLoot_box:

Error in code at line 7:
loot_height=loot_box_items*(loot_items_space+sprite_get_height(oItems.spr_back))+loot_items_start_y_space
^
at position 65: Unknown variable oItems

___________________________________________
ERROR in
action number 1
of Draw Event
for object oInventory:

In script not_above_other:
Error in code at line 5:
var i;i=idif argument0!=0 then {i=argument0;}if i=oLoot_Box.id{if not_above("Inventory") and not_above("Equipment") and not_above("Enchant") then{return(true);}}else if i=oInventory.id{if not_above("Loot") and not_above("Equipment") and not_above("Enchant") then{return(true);}}else if i=oEquipment.id{if not_above("Loot") and not_above("Inventory")and not_above("Enchant") then{return(true);}}else if i=oEnchant_Window.id {if not_above("Loot") and not_above("Inventory") and not_above("Equipment") then{return(true);}}return(false);
^
at position 6: Unknown variable oLoot_Box

___________________________________________
ERROR in
action number 1
of Draw Event
for object oEquipment:

In script not_above_other:
Error in code at line 5:
var i;i=idif argument0!=0 then {i=argument0;}if i=oLoot_Box.id{if not_above("Inventory") and not_above("Equipment") and not_above("Enchant") then{return(true);}}else if i=oInventory.id{if not_above("Loot") and not_above("Equipment") and not_above("Enchant") then{return(true);}}else if i=oEquipment.id{if not_above("Loot") and not_above("Inventory")and not_above("Enchant") then{return(true);}}else if i=oEnchant_Window.id {if not_above("Loot") and not_above("Inventory") and not_above("Equipment") then{return(true);}}return(false);
^
at position 6: Unknown variable oLoot_Box

___________________________________________
ERROR in
action number 1
of Draw Event
for object oitems:

In script not_above_other:
Error in code at line 5:
var i;i=idif argument0!=0 then {i=argument0;}if i=oLoot_Box.id{if not_above("Inventory") and not_above("Equipment") and not_above("Enchant") then{return(true);}}else if i=oInventory.id{if not_above("Loot") and not_above("Equipment") and not_above("Enchant") then{return(true);}}else if i=oEquipment.id{if not_above("Loot") and not_above("Inventory")and not_above("Enchant") then{return(true);}}else if i=oEnchant_Window.id {if not_above("Loot") and not_above("Inventory") and not_above("Equipment") then{return(true);}}return(false);
^
at position 6: Unknown variable oLoot_Box

___________________________________________
ERROR in
action number 1
of Begin Step Event
for object oEquipment:

Error in code at line 1:
if global.active=id then {depth=global.active_depth;} else {depth=global.inactive_depth-depth_num*2;}
^
at position 89: Unknown variable depth_num

___________________________________________
ERROR in
action number 1
of Begin Step Event
for object oLoot_box:

In script not_above_other:
Error in code at line 5:
var i;i=idif argument0!=0 then {i=argument0;}if i=oLoot_Box.id{if not_above("Inventory") and not_above("Equipment") and not_above("Enchant") then{return(true);}}else if i=oInventory.id{if not_above("Loot") and not_above("Equipment") and not_above("Enchant") then{return(true);}}else if i=oEquipment.id{if not_above("Loot") and not_above("Inventory")and not_above("Enchant") then{return(true);}}else if i=oEnchant_Window.id {if not_above("Loot") and not_above("Inventory") and not_above("Equipment") then{return(true);}}return(false);
^
at position 6: Unknown variable oLoot_Box

___________________________________________
ERROR in
action number 1
of Step Event
for object oInventory:

In script not_above_other:
Error in code at line 5:
var i;i=idif argument0!=0 then {i=argument0;}if i=oLoot_Box.id{if not_above("Inventory") and not_above("Equipment") and not_above("Enchant") then{return(true);}}else if i=oInventory.id{if not_above("Loot") and not_above("Equipment") and not_above("Enchant") then{return(true);}}else if i=oEquipment.id{if not_above("Loot") and not_above("Inventory")and not_above("Enchant") then{return(true);}}else if i=oEnchant_Window.id {if not_above("Loot") and not_above("Inventory") and not_above("Equipment") then{return(true);}}return(false);
^
at position 6: Unknown variable oLoot_Box

___________________________________________
ERROR in
action number 1
of End Step Event
for object oEquipment:

Error in code at line 1:
if global.active!=id and (over_bar=true or over_eq=true) and mouse_check_button_pressed(mb_left) and (not_above_other()=true or (not_above("",global.active)=true and depth_num=1)) then
^
at position 44: Unknown variable over_eq

___________________________________________
ERROR in
action number 1
of End Step Event
for object oLoot_box:

Error in code at line 7:
loot_height=loot_box_items*(loot_items_space+sprite_get_height(oItems.spr_back))+loot_items_start_y_space
^
at position 65: Unknown variable oItems

___________________________________________
ERROR in
action number 1
of Draw Event
for object oInventory:

In script not_above_other:
Error in code at line 5:
var i;i=idif argument0!=0 then {i=argument0;}if i=oLoot_Box.id{if not_above("Inventory") and not_above("Equipment") and not_above("Enchant") then{return(true);}}else if i=oInventory.id{if not_above("Loot") and not_above("Equipment") and not_above("Enchant") then{return(true);}}else if i=oEquipment.id{if not_above("Loot") and not_above("Inventory")and not_above("Enchant") then{return(true);}}else if i=oEnchant_Window.id {if not_above("Loot") and not_above("Inventory") and not_above("Equipment") then{return(true);}}return(false);
^
at position 6: Unknown variable oLoot_Box

___________________________________________
ERROR in
action number 1
of Draw Event
for object oEquipment:

In script not_above_other:
Error in code at line 5:
var i;i=idif argument0!=0 then {i=argument0;}if i=oLoot_Box.id{if not_above("Inventory") and not_above("Equipment") and not_above("Enchant") then{return(true);}}else if i=oInventory.id{if not_above("Loot") and not_above("Equipment") and not_above("Enchant") then{return(true);}}else if i=oEquipment.id{if not_above("Loot") and not_above("Inventory")and not_above("Enchant") then{return(true);}}else if i=oEnchant_Window.id {if not_above("Loot") and not_above("Inventory") and not_above("Equipment") then{return(true);}}return(false);
^
at position 6: Unknown variable oLoot_Box

___________________________________________
ERROR in
action number 1
of Draw Event
for object oitems:

In script not_above_other:
Error in code at line 5:
var i;i=idif argument0!=0 then {i=argument0;}if i=oLoot_Box.id{if not_above("Inventory") and not_above("Equipment") and not_above("Enchant") then{return(true);}}else if i=oInventory.id{if not_above("Loot") and not_above("Equipment") and not_above("Enchant") then{return(true);}}else if i=oEquipment.id{if not_above("Loot") and not_above("Inventory")and not_above("Enchant") then{return(true);}}else if i=oEnchant_Window.id {if not_above("Loot") and not_above("Inventory") and not_above("Equipment") then{return(true);}}return(false);
^
at position 6: Unknown variable oLoot_Box

___________________________________________
ERROR in
action number 1
of Begin Step Event
for object oEquipment:

Error in code at line 1:
if global.active=id then {depth=global.active_depth;} else {depth=global.inactive_depth-depth_num*2;}
^
at position 89: Unknown variable depth_num

___________________________________________
ERROR in
action number 1
of Begin Step Event
for object oLoot_box:

In script not_above_other:
Error in code at line 5:
var i;i=idif argument0!=0 then {i=argument0;}if i=oLoot_Box.id{if not_above("Inventory") and not_above("Equipment") and not_above("Enchant") then{return(true);}}else if i=oInventory.id{if not_above("Loot") and not_above("Equipment") and not_above("Enchant") then{return(true);}}else if i=oEquipment.id{if not_above("Loot") and not_above("Inventory")and not_above("Enchant") then{return(true);}}else if i=oEnchant_Window.id {if not_above("Loot") and not_above("Inventory") and not_above("Equipment") then{return(true);}}return(false);
^
at position 6: Unknown variable oLoot_Box

___________________________________________
ERROR in
action number 1
of Step Event
for object oInventory:

In script not_above_other:
Error in code at line 5:
var i;i=idif argument0!=0 then {i=argument0;}if i=oLoot_Box.id{if not_above("Inventory") and not_above("Equipment") and not_above("Enchant") then{return(true);}}else if i=oInventory.id{if not_above("Loot") and not_above("Equipment") and not_above("Enchant") then{return(true);}}else if i=oEquipment.id{if not_above("Loot") and not_above("Inventory")and not_above("Enchant") then{return(true);}}else if i=oEnchant_Window.id {if not_above("Loot") and not_above("Inventory") and not_above("Equipment") then{return(true);}}return(false);
^
at position 6: Unknown variable oLoot_Box

Edited by NoobScratcher, 27 August 2010 - 06:59 PM.

  • 0

#15 loverock125

loverock125

    GMC Member

  • GMC Member
  • 1616 posts
  • Version:GM8

Posted 27 August 2010 - 11:20 PM

@NoobScratcher
You must also copy the object oItems and oLoot_Box from my example. If you are having troubles with this and you trust me then if you send me a link with your gmk file (personal message) then I can implement it for you.
  • 0

#16 Psycho The Game

Psycho The Game

    Shattered Core Games

  • New Member
  • 88 posts

Posted 28 August 2010 - 12:01 AM

Wow this is really cool, only thing I dont like about it is that it uses a lot of CPU (But not as much as some other inventorys).

Very Very Very Very Nice...

Might I suggest using surfaces? I havn't looked at your code yet, but I could see this using even less CPU if a good combination of surfaces and regular drawing is used...
Just a suggestion ;)

-Psycho The Game

EDIT:

Also I found this error while playing around, press 'S' to get it...


___________________________________________
ERROR in
action number 1
of Begin Step Event
for object oShop:

Error in code at line 5:
   if npc_id.use_npc_text=true then
             ^
at position 12: Unknown variable use_npc_text

And I also found this bug, look at this picture here...
Look at the top left corner...What I did is open the NPC and sold him some stuff, then I right clicked on a enchantment thing and the enchantment window came up. After that I went back to the same NPC and tried to buy back some items... Thats when that happend.

Still very very cool though ;)

Edited by Psycho The Game, 28 August 2010 - 12:29 AM.

  • 0

#17 loverock125

loverock125

    GMC Member

  • GMC Member
  • 1616 posts
  • Version:GM8

Posted 29 August 2010 - 09:41 AM

Wow this is really cool, only thing I dont like about it is that it uses a lot of CPU (But not as much as some other inventorys).

Very Very Very Very Nice...

Might I suggest using surfaces? I havn't looked at your code yet, but I could see this using even less CPU if a good combination of surfaces and regular drawing is used...
Just a suggestion ;)

-Psycho The Game

EDIT:

Also I found this error while playing around, press 'S' to get it...


___________________________________________
ERROR in
action number 1
of Begin Step Event
for object oShop:

Error in code at line 5:
   if npc_id.use_npc_text=true then
             ^
at position 12: Unknown variable use_npc_text

And I also found this bug, look at this picture here...
Look at the top left corner...What I did is open the NPC and sold him some stuff, then I right clicked on a enchantment thing and the enchantment window came up. After that I went back to the same NPC and tried to buy back some items... Thats when that happend.

Still very very cool though ;)



Thank you for the reply, for the suggestions, for the nice comments and for the bugs report. I appreciate it, I've fixed both bugs and re-uploaded the file.

Thank you very much again : )
  • 0

#18 Psycho The Game

Psycho The Game

    Shattered Core Games

  • New Member
  • 88 posts

Posted 29 August 2010 - 01:58 PM

Oh one more quick suggestion... When selling items that are in a stack, you should allow the player to slelect how manny in that stack they want to sell..

Still very cool ;)
  • 0

#19 NoobScratcher

NoobScratcher

    GMC Member

  • New Member
  • 132 posts

Posted 29 August 2010 - 11:26 PM


Wow this is really cool, only thing I dont like about it is that it uses a lot of CPU (But not as much as some other inventorys).

Very Very Very Very Nice...

Might I suggest using surfaces? I havn't looked at your code yet, but I could see this using even less CPU if a good combination of surfaces and regular drawing is used...
Just a suggestion ;)

-Psycho The Game

EDIT:

Also I found this error while playing around, press 'S' to get it...


___________________________________________
ERROR in
action number 1
of Begin Step Event
for object oShop:

Error in code at line 5:
   if npc_id.use_npc_text=true then
     		^
at position 12: Unknown variable use_npc_text

And I also found this bug, look at this picture here...
Look at the top left corner...What I did is open the NPC and sold him some stuff, then I right clicked on a enchantment thing and the enchantment window came up. After that I went back to the same NPC and tried to buy back some items... Thats when that happend.

Still very very cool though ;)



Thank you for the reply, for the suggestions, for the nice comments and for the bugs report. I appreciate it, I've fixed both bugs and re-uploaded the file.

Thank you very much again : )


hey i sent you the game :) please please fix it lol i need to press on so i can get my game off the ground tooken me weeks to just get a 3d terrain 3d water and texture now all i need is the ui :) and im ready to start building the towns and what not

Edited by NoobScratcher, 29 August 2010 - 11:26 PM.

  • 0

#20 loverock125

loverock125

    GMC Member

  • GMC Member
  • 1616 posts
  • Version:GM8

Posted 30 August 2010 - 08:29 AM

@Noobscratcher

Sure but I can't find it. Where did you send it?
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users