Draw all Items,Weapons and Armor on a Window?

Jaikee

Villager
Member
Joined
Dec 8, 2015
Messages
8
Reaction score
1
First Language
German, English
Primarily Uses
RMVXA
Hello Community,

I have a window and would like to display the weapons, items and armor that the player owns in this Window.

I use the Command for the VX Ace:

def draw_item(item)
rect = item_rect_for_text(item)
item = command_name(item)
draw_item_name(item, rect.x, rect.y, true)
draw_text(rect.x, rect.y, contents_width / 2 - 30, line_height, $game_party.item_number(item), 2)
end
This should actually be displayed all the items, weapons and armor, or? It also works just shows me the items on without armor and weapons.

Please help me :D Iàm New YAHH!
 

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
15,370
Reaction score
8,547
First Language
English
Primarily Uses
RMMV
Are you wanting to learn how to do it yourself or asking for someone else to do it for you? If you are asking for someone else to do it, this needs to be moved to Script Requests. Thanks.
 

Jaikee

Villager
Member
Joined
Dec 8, 2015
Messages
8
Reaction score
1
First Language
German, English
Primarily Uses
RMVXA
Hello mlogan,

i wanting this to learn but i have no ideas what i make it wrong.
I would like to learn the code at the same time if someone can give me help.

I have no Ideas..why no arms and armor are displayed in the window?

~Jaikee

#BIG EDIT:
I have found the Error. I make a Command List:

def make_command_list
items = $game_party.weapons
items.each {|i| add_command(i, i) }
end
If i make " items = $game_party.weapons" then draw me all Weapons in the Inventory.
It was a Fail from me -.-.
But we can i make Draw all Items to the Window, when i Coding:


def make_command_list
items = $game_party.weapons
items = $game_party.items
items.each {|i| add_command(i, i) }
end
then it Shows again the Items nothing Armor and Weapons...what i make wrong? =( Pls Help, it will Learning.
 
Last edited:

MobiusXVI

Game Maker
Veteran
Joined
Mar 20, 2013
Messages
383
Reaction score
91
First Language
English
Primarily Uses
I'm not super familiar with VXAce, but if
If i make " items = $game_party.weapons" then draw me all Weapons in the Inventory.
then you can try combining all of those by doing this:

items = $game_party.weapons + $game_party.items + $game_party.armors
 

Jaikee

Villager
Member
Joined
Dec 8, 2015
Messages
8
Reaction score
1
First Language
German, English
Primarily Uses
RMVXA
Hi MobiusXVI,

are you Crazy?
items = $game_party.weapons + $game_party.items + $game_party.armors
That was so RIGHT! BINGO! THANK YOU!
I had all ways tried so much but this never oh man... it was so simple :D

~Jaikee
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Frostorm wrote on Featherbrain's profile.
Hey, so what species are your raptors? Any of these?
... so here's my main characters running around inside "Headspace", a place people use as a safe place away from anxious/panic related thinking.
Stream will be live shortly! I will be doing some music tonight! Feel free to drop by!
Made transition effects for going inside or outside using zoom, pixi filter, and a shutter effect
I have gathered enough feedback from a few selected people. But it is still available if you want to sign up https://forums.rpgmakerweb.com/index.php?threads/looking-for-testers-a-closed-tech-demo.130774/

Forum statistics

Threads
105,992
Messages
1,018,189
Members
137,771
Latest member
evoque
Top