Chaos Project

RPG Maker => RPG Maker Scripts => Script Requests => Topic started by: Jackolas on February 28, 2009, 10:30:13 am

Title: [RESOLVED] probely simple request (check what weapon equiped)
Post by: Jackolas on February 28, 2009, 10:30:13 am
I just wane know what to do to check for a weapon id when the damage is calculated.

an example:

if the player has a sword equipped the following calculation is used:
atk = [attacker.atk + (attacker.str) * (1 - (self.pdef/1000))
and with a bow this is used:
atk = [attacker.atk + (attacker.agi) * (1 - (self.pdef/1000))

my only problem is that he needs to check what weapon is equipped to see what dmg calculation is used.
but could not work it out (1 note.. it should work for multiple bows ets. so an array)

hope this explains enough. don't need whole code.. just how to do this little bid
Title: Re: probely simple request (check what weapon equiped)
Post by: winkio on February 28, 2009, 10:35:56 am
first check to make sure that the attacker is an actor (as opposed to an enemy).  then, the weapon id is attacker.weapon_id
Title: Re: probely simple request (check what weapon equiped)
Post by: Jackolas on February 28, 2009, 10:45:51 am
whoo  :haha: that worked

now i only need to set up an array so it will work with multiple weapons.. any ideas?

EDIT: NVM already fixed it

Thanks m8..

note: Srry for the double post (thanks Starrodkirby for changing it to 1 post)

Doubleposting? No thanks m8...~Love, Starrodkirby86