New account registration is temporarily disabled.

ITEM DATABASE QUESTION (RPG MAKER VX ACE)

Posts

Pages: 1
I just started a new VX ace project. I really like the engine so far, but I'm running into some of it's shortcomings.

There doesn't seem to be a way to give items based on their ID#. Like give an item of v[n], where n is the ID# of the item I want to give. Is there an easy way to script this? It would be much simpler then a super long conditional statement.

Thanks,
equnax
Call Script:
$game_party.gain_item($data_items[id], #ofItemstoGive)

That's just rough off the top of my head.
Your script works fine when I manually type of number into the id, but how do I reference a stored variable?

Thanks again!
LockeZ
I'd really like to get rid of LockeZ. His play style is way too unpredictable. He's always like this too. If he ran a country, he'd just kill and imprison people at random until crime stopped.
5958
Call Script:
$game_party.gain_item($data_items[$game_variables[variable #]], #ofItemstoGive)

for the complete thing in case you were confused
Hmm, I'm getting an error still. For example I replace variable # with "6". Because that's the variable i'd like to reference. However when I run it, it gives me an error saying it expected a ")".
$game_party.gain_item($data_items[$game_variables[6]], 1)

If it splits that code into two lines (which it might) You need to use this instead:

var = $game_variables[6]
item = $data_items[var]
$game_party.gain_item(item, 1)
That did the trick, thanks everyone.
Pages: 1