accessing stats?(resolved)

Started by M3T41 AG3, September 30, 2010, 02:42:18 pm

Previous topic - Next topic

M3T41 AG3

September 30, 2010, 02:42:18 pm Last Edit: October 06, 2010, 04:30:15 pm by M3T41 AG3
so i writing this script and i need some help with finding the proper syntax for accessing and actros stats(being :strength, agility, and what not) ive tried $game_party.actors["id"].parameters["kind","value"]
and $data_actors["id"].parameters["kind","value"] and rgss didnt like either giving me a nomethod error undefined method "paramenters" for Actor// nil nillclass respectively. please someone help.

M3T41 AG3

so i actually found my own awnser. her it is for ppl who ever have the same question.

  actor= $game_party.actors[i]
  agility= actor.base_agi
  weapon = $data_weapons[actor.weapon_id]
  armor1 = $data_armors[actor.armor1_id]
  armor2 = $data_armors[actor.armor2_id]
  armor3 = $data_armors[actor.armor3_id]
  armor4 = $data_armors[actor.armor4_id]
  agility += weapon != nil ? weapon.agi_plus : 0
  agility += armor1 != nil ? armor1.agi_plus : 0
  agility += armor2 != nil ? armor2.agi_plus : 0
  agility += armor3 != nil ? armor3.agi_plus : 0
  agility += armor4 != nil ? armor4.agi_plus : 0
  agility = [[agility, 1].max, 999].min


just replace agi with :

str for strenght

dex for dextarity

int for intelligence

agi for agility.