Author Topic: RESOLVED-Consumable weapons?  (Read 1227 times)

Offline [Faint]

  • Transcended Spirit
  • ***
  • Posts: 182
  • LV: 6
  • Gender: Male
  • "Sit upon the frozen heavens."
    • View Profile
RESOLVED-Consumable weapons?
« on: October 05, 2009, 03:36:56 AM »
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?
« Last Edit: October 06, 2009, 11:18:59 PM by [Faint] »
Scripts by me - State Requirement Skills
current project - Project: AURA

Offline fugibo

  • World Conqueror
  • Chaos User
  • ******
  • Posts: 1966
  • LV: 44
    • View Profile
Re: Consumable weapons?
« Reply #1 on: October 06, 2009, 02:39:26 AM »
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.

Offline [Faint]

  • Transcended Spirit
  • ***
  • Posts: 182
  • LV: 6
  • Gender: Male
  • "Sit upon the frozen heavens."
    • View Profile
Re: Consumable weapons?
« Reply #2 on: October 06, 2009, 11: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?
Scripts by me - State Requirement Skills
current project - Project: AURA

Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6591
  • LV: 407
  • Gender: Male
    • View Profile
Re: Consumable weapons?
« Reply #3 on: October 06, 2009, 11:15:59 PM »
in a script call do this
Code: [Select]
$game_variables[var_id] = $game_party.weapon_number(wep_id)
That'll set the variable to the amount of the weapon the party has.

Offline [Faint]

  • Transcended Spirit
  • ***
  • Posts: 182
  • LV: 6
  • Gender: Male
  • "Sit upon the frozen heavens."
    • View Profile
Re: Consumable weapons?
« Reply #4 on: October 06, 2009, 11: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.
Scripts by me - State Requirement Skills
current project - Project: AURA