Hello everybody!
I created this method to be called from the damage formula of one item
The damage formula passes target, minimum value, maximum value and item id.
It all works quite good until the Wait part, it neither waits for an input nor returns to scene item,
if I removed the while part it would call scene_item immediately, and the player could not see the message until the menu is manually closed,
what did I do wrong? >_>
By the way, the item can only be used used from menu, and not in battle.
Also, is there a difference between SceneManager.call and SceneManager.goto? I tried both.
I created this method to be called from the damage formula of one item
class Game_Battlerdef eat_level_up(b,min,max,n) if b.level < min SceneManager.goto(Scene_Map) #close item menu to display message $game_message.add("This item is too much powerful!") $game_party.gain_item($data_items[n], 1) elsif b.level > max SceneManager.goto(Scene_Map) #close item menu to display message $game_message.add("This item is not powerful enough!") $game_party.gain_item($data_items[n], 1) else SceneManager.goto(Scene_Map) #close item menu to display level up b.change_level(b.level + 1, true) end i=0 while (i==0) # Wait for user to close message, then return to Scene_itemWait(1)break if Input.press?🙂Z)endSceneManager.call(Scene_Item)return 0end #end moduleend
It all works quite good until the Wait part, it neither waits for an input nor returns to scene item,
if I removed the while part it would call scene_item immediately, and the player could not see the message until the menu is manually closed,
what did I do wrong? >_>
By the way, the item can only be used used from menu, and not in battle.
Also, is there a difference between SceneManager.call and SceneManager.goto? I tried both.