Help - Search - Members - Calendar
Full Version: Scene_ItemBase problem
RPG RPG Revolution Forums > Game Engines > RPG Maker VX Ace Discussion
rural_monk
I found myself a new problem. In the Scene_ItemBase script, theres this...
def user
$game_party.movable_members.max_by {|member| member.pha }
end

What on earth is the member.pha??? this is the only place i see that. no other script in ace OR vx has it. i also looked online, but no ruby tut sites i find seem to say anything about it. any help? thanks

ehh, sorry for the second post. but i figured it out. its just short for the pharmaceutical items. i should have looked a lil longer. but i gots a new prob. the part before that. "max_by". any ideas? happy.gif
Kread-EX
It's the pharmacology effect (raises effectiveness of items). It's typically given with traits. Unless in VX, Ace allows you to specify a certain medicine knowledge value and doesn't automatically doubles the item efficiency.

EDIT: Okay, you ninja'd me, so I merged your double post. Anyways, max_by returns the object with the highest value in the block. In this case, it returns the party member with the highest pharmacology value.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.