Using "Event Commands -> Script" to add an item

Status
Not open for further replies.

Vixxth

Veteran
Veteran
Joined
Jan 18, 2022
Messages
30
Reaction score
18
First Language
English
Primarily Uses
RMMZ
For reasons that are tedious and hard to explain...
is there a way to use the script section of the Event commands to add items to the inventory...

Something like:
$gameParty.gainItem($dataItems[1999], $gameVariables.value(1), false)

Which I believed would add an item from the items tab, ID 1999, and add 1 of the item..
but when i check the inventory, nothing was added.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
4,969
Reaction score
4,554
First Language
English
Primarily Uses
RMMZ
Did you definitely set the value of game variable 1 to 1 before calling the script command?
 

Vixxth

Veteran
Veteran
Joined
Jan 18, 2022
Messages
30
Reaction score
18
First Language
English
Primarily Uses
RMMZ
Sorry to waste anyones time...

$gameParty.gainItem($dataItems[1999], 1)
 

ZombieKidzRule

Aren't these two Zombie Kidz cute?
Veteran
Joined
Jan 9, 2022
Messages
397
Reaction score
369
First Language
English
Primarily Uses
RMMZ
Sorry to waste anyones time...

$gameParty.gainItem($dataItems[1999], 1)
Don't apologize, please!

This just helped me learn and understand at least two more things about scripts!

Thanks for helping a total NOOB!:rock-left:
 
  • Like
Reactions: Bex

bishiba

Adept
Veteran
Joined
Apr 6, 2016
Messages
278
Reaction score
161
First Language
Swedish
Primarily Uses
N/A
Glad you solved it, and like @kvngreeley said, do not apologize, this is not stackoverflow :)
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
9,645
Reaction score
6,152
First Language
Dutch
Primarily Uses
RMXP

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Latest Threads

Latest Profile Posts

ScreenShot_5_26_2022_11_36_32.png
added a Panic gauge to battle. it fills up according to your actions. each character has a different passive that activates once the gauge is full. also once full, a countdown starts and after each action taken, the gauges decreases. with each character, the decrease is different.
Genuinely considering making a thread informing people how to Google.
It's time for Da Update...

Prototyping some overworld abilities. Some of the characters you'll meet on your journey can use special overworld skills to travel around. This can be something like digging holes in the ground or getting hints towards your next objective.

Even more things I made.
Equipping Abilities is very important.
fLhHhZjh.gif

Forum statistics

Threads
122,157
Messages
1,146,895
Members
160,424
Latest member
SpaapS
Top