- Joined
- Jun 3, 2013
- Messages
- 642
- Reaction score
- 62
- First Language
- English
- Primarily Uses
This is the script I'm working with:
class Game_Enemy < Game_Battler
def change_param(param_id, value)
enemy.params[param_id] = value
end
end
This is the script call:
$game_troop.members[iD].change_param(param_id, value)
Here was the information the author gave me to work with:
ID: 1, 2, 3,... (in Troops)
param_id: (0 is Max HP, 1 is Max MP)
def mhp; param(0); end # MHP Maximum Hit Points
def mmp; param(1); end # MMP Maximum Magic Points
def atk; param(2); end # ATK ATtacK power
def def; param(3); end # DEF DEFense power
def mat; param(4); end # MAT Magic ATtack power
def mdf; param(5); end # MDF Magic DeFense power
def agi; param(6); end # AGI AGIlity
def luk; param(7); end # LUK LUcK
value: the var.
What I'm trying to do is use this script to change the value of parameters for my enemies - but I'm having issues with the syntax and figuring out what symbols carry over and which ones do not when writing the script call.
So if someone could give me a direct example of how to write out this script call to change the mhp of an enemy to variable 1 it would be a big help to me. Being able to see it as it is actually written in the event would fix my problems I think.
class Game_Enemy < Game_Battler
def change_param(param_id, value)
enemy.params[param_id] = value
end
end
This is the script call:
$game_troop.members[iD].change_param(param_id, value)
Here was the information the author gave me to work with:
ID: 1, 2, 3,... (in Troops)
param_id: (0 is Max HP, 1 is Max MP)
def mhp; param(0); end # MHP Maximum Hit Points
def mmp; param(1); end # MMP Maximum Magic Points
def atk; param(2); end # ATK ATtacK power
def def; param(3); end # DEF DEFense power
def mat; param(4); end # MAT Magic ATtack power
def mdf; param(5); end # MDF Magic DeFense power
def agi; param(6); end # AGI AGIlity
def luk; param(7); end # LUK LUcK
value: the var.
What I'm trying to do is use this script to change the value of parameters for my enemies - but I'm having issues with the syntax and figuring out what symbols carry over and which ones do not when writing the script call.
So if someone could give me a direct example of how to write out this script call to change the mhp of an enemy to variable 1 it would be a big help to me. Being able to see it as it is actually written in the event would fix my problems I think.
Last edited by a moderator:
