Al CheddahToday at 12:00 AM
say i have a limit on stat boosting items
and once a certain number is reached, the bonuses don't work
pink b0iToday at 12:01 AM
like the pokemon IV items?
Al CheddahToday at 12:02 AM
that might e the best way to explain it, yes
pink b0iToday at 12:02 AM
yeah you're better off going another route
Al CheddahToday at 12:02 AM
i have a CE that just says "You've reached your limit", but I wanna makes sure it doesn't do anything
i see
what would/should i do?
pink b0iToday at 12:03 AM
do you want the item to call a common event?
Al CheddahToday at 12:04 AM
yes
all the stat boster call the same event
that adds 1 to a variale when there used
pink b0iToday at 12:05 AM
how are you determining what item was used
Al CheddahToday at 12:05 AM
i got an item ID catcher from LittleDrago awhile back
that gets the item ID
pink b0iToday at 12:08 AM
and your item use counter is stored in game variables
Al CheddahToday at 12:08 AM
yes
once it reaches a set number it should stop giving a bonus
pink b0iToday at 12:09 AM
then make the item itself add nothing, and do all the stat manipulation in the event
Al CheddahToday at 12:09 AM
okay. how would I go about that?
using the code from earlier?
pink b0iToday at 12:10 AM
conditional branch: if not reached limit
actor stat+
else
message "can no longer boost"
add item back to party
Al CheddahToday at 12:11 AM
ok, but would I wo do that for the item target?
pink b0iToday at 12:12 AM
maybe you can make another variable for Game_Party, like last_item_target
Al CheddahToday at 12:13 AM
in a script call?:thinking:
pink b0iToday at 12:14 AM
class Game_Party
attr_accessor :last_item_target
end
Al CheddahToday at 12:14 AM
aahhh
in the actual script
ok
pink b0iToday at 12:14 AM
# If single target
if @target_window.index >= 0
# Apply item use effects to target actor
target = $game_party.actors[@target_window.index]
$game_party.last_item_target = target
used = target.item_effect(@item)
end
Al CheddahToday at 12:15 AM
ok so make last_item_target a variable
like in that code
Al CheddahToday at 12:34 AM
wait i thought we were adding/removing the item effects in the event instead of the item itself?
pink b0iToday at 12:35 AM
i had written code that i have since deleted
you can ignore