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 Posts

Latest Profile Posts

demonow.jpg

Eniko: Ghosts Of Grace Alpha Demo is Officially LIVE on Steam!

>> DOWNLOAD AND PLAY THE DEMO ON STEAM NOW!
Firefly130984 wrote on WallCat's profile.
Hello, I would try to beta test your game.
Parallel I would write a guide.
I am already planning some games to make in Unite... I hope it gets a solid release date soon!
Remember to do even 0,01% progress on your game today! You can!

Forum statistics

Threads
122,130
Messages
1,146,774
Members
160,423
Latest member
choppicat
Top