Chaos Project

RPG Maker => Tutorials => Tutorial Requests => Topic started by: [Faint] on October 04, 2009, 09:36:56 pm

Title: RESOLVED-Consumable weapons?
Post by: [Faint] on October 04, 2009, 09:36:56 pm
Ok I was not really sure where to post this but  I figured here would be best.

I am trying to make events that require a certain weapon to be equiped which is easy with a conditional branch. then the event would subtract 1 from the total amount of that weapon but when I do this through the "change weapon" option it will subtract the 1 unless the last 1 is the 1 equiped then it does nothing. is there a way to change this so even if the last of that weapon in the characters inventory is the 1 equiped it will still take it away?
Title: Re: Consumable weapons?
Post by: fugibo on October 05, 2009, 08:39:26 pm
Quote from: [Faint] on October 04, 2009, 09:36:56 pm
Ok I was not really sure where to post this but  I figured here would be best.

I am trying to make events that require a certain weapon to be equiped which is easy with a conditional branch. then the event would subtract 1 from the total amount of that weapon but when I do this through the "change weapon" option it will subtract the 1 unless the last 1 is the 1 equiped then it does nothing. is there a way to change this so even if the last of that weapon in the characters inventory is the 1 equiped it will still take it away?


Unequip the weapon, then remove it.
Title: Re: Consumable weapons?
Post by: [Faint] on October 06, 2009, 05:12:43 pm
mormally that wold work but my case is a unique one. I need it to automatically take the weapon from the inventory even if it is above 1 and if it is at 1 un equip it and then remove it but there is no conditional branch option to make it check the amount of a weapon in the inventory and there is no way to set the amount to a variable as far as i know. so any other suggestions?
Title: Re: Consumable weapons?
Post by: G_G on October 06, 2009, 05:15:59 pm
in a script call do this
$game_variables[var_id] = $game_party.weapon_number(wep_id)


That'll set the variable to the amount of the weapon the party has.
Title: Re: Consumable weapons?
Post by: [Faint] on October 06, 2009, 05:18:15 pm
omg thank you I figured it was a basic call script but i am new to scripting. ( still lerning :( ) this problem has been holding me up for like 3 days now lol but thank you.