Im trying to make a weapon that calls a skill after dealing damage. For now, i was dealing with the action_battlers array, trying to add a new magic action before the attack action.
anyway, the main problem is this_:
actor2 = actor.clone
actor2.current_action.kind = 1
actor2.current_action.skill_id = value[1]
actor2.improved_effect = 1
actor.current_action.kind = 0
p actor2.current_action.kind
p actor.current_action.kind
The p' says 0 and 0. Why? I cant modify one without modifing the other, and i have already used the clone/dup, what im doing wrong?
anyway, the main problem is this_:
actor2 = actor.clone
actor2.current_action.kind = 1
actor2.current_action.skill_id = value[1]
actor2.improved_effect = 1
actor.current_action.kind = 0
p actor2.current_action.kind
p actor.current_action.kind
The p' says 0 and 0. Why? I cant modify one without modifing the other, and i have already used the clone/dup, what im doing wrong?
Code:
# Add actor to @action_battlers array
for actor in $game_party.actors
# Checks for adding a skill in a weapon attack
if $data_weapons[actor.weapon_id].call_skill
p 'ok'
value = $data_weapons[actor.weapon_id].call_skill
actor2 = actor.clone
# Changue the action kind and skill id
actor2.current_action.kind = 1
actor2.current_action.skill_id = value[1]
actor2.improved_effect = 1
actor.current_action.kind = 0
p actor2.current_action.kind
p actor.current_action.kind
@action_battlers.push(actor)
@action_battlers.push(actor2)
else
@action_battlers.push(actor)
end
end