03-18-2010, 02:01 PM
Thanks mister vvulfman xD!
It works =)
what do I have to add to the script line that
an animation shows up? I made one that
actually shows the light around the character
when firing a weapon =P
EDIT: I noticed that the bullet sound continues to shot D:
what did I make wrong? :X
that's where it is inserted
And my last problem would be....
actually what shall I script when
the character is out of ammo?
There should come out a sound too I guess ^^
it would be like a variable for the item "Ammo"
wich also rises and falls when gaining or shooting
"Ammo" =P (I know how to do it with events but
its different from scripting Dx)
It works =)
what do I have to add to the script line that
an animation shows up? I made one that
actually shows the light around the character
when firing a weapon =P
EDIT: I noticed that the bullet sound continues to shot D:
what did I make wrong? :X
that's where it is inserted
Code:
def player_range
Audio.bgs_play("Audio/SE/102-Attack14",
100,100) if @actor.weapon_id == 22
#Get the weapon
w = RANGE_WEAPONS[@actor.weapon_id]
#Return if the ammo isn't there
return if w[3] != 0 and $game_party.item_number(w[3]) == 0
$game_player.animation_id = $data_weapons[@actor.weapon_id].animation1_id
#Add mash time
@button_mash = (w[5] == nil ? MASH_TIME*10 : w[5]*10)
#Delete an ammo
$game_party.lose_item(w[3], 1) if w[3] != 0
#Make the attack
@range.push(Game_Ranged_Weapon.new($game_player, @actor, @actor.weapon_id))
#Animate
return if w[7] == nil
animate($game_player, $game_player.character_name+w[7].to_s) if @player_ani
return
end
And my last problem would be....
actually what shall I script when
the character is out of ammo?
There should come out a sound too I guess ^^
it would be like a variable for the item "Ammo"
wich also rises and falls when gaining or shooting
"Ammo" =P (I know how to do it with events but
its different from scripting Dx)