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,553
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 Posts

Latest Profile Posts

Hi, I'm a new and upcoming Indie Developer, and I could really use some help when it comes to system programming. Explorers can only go so far before needing a map, you know?
I made a comic strip with the characters of my game.Flor en la cola eng.jpg
Hey, what does it mean in settings, privacy, where it says allow users to: view your identities??????????
I have returned yet again. No reason for my hiatus; just got distracted by video games and stuff. I figured out how to make a bootleg Ys 1 Battle system using in engine scripting (The only plugin enabled is the HUD thing).
Unfortunately I have no idea how to program but-stabbing as a crit without it being even more complicated to program so this is it.

Kickstarter successful!! I'm gonna have a Hot GameDev Summer in the trenches!

Forum statistics

Threads
122,050
Messages
1,146,128
Members
160,320
Latest member
BraveHeartBrony
Top