Author Topic: [XP] How to put Variable as Prize???  (Read 3858 times)

Offline Rolandojis

  • Trained Member
  • *
  • Posts: 25
  • LV: -1
    • View Profile
[XP] How to put Variable as Prize???
« on: April 09, 2012, 09:05:37 PM »
I want like a monster that instead of dropping and item it drops a variable when killed

Example: After defeating Monster1 you get +1 of variable2

How can I do that???

Offline Calintz

  • Guardian of Chaos
  • ********
  • Posts: 3803
  • LV: 108
  • Gender: Male
  • A Pixel's Worst Nightmare
    • View Profile
Re: [XP] How to put Variable as Prize???
« Reply #1 on: April 09, 2012, 11:42:48 PM »
in other words, you want to increase a specified variable by one for every time you defeat a specific enemy?

Offline Rolandojis

  • Trained Member
  • *
  • Posts: 25
  • LV: -1
    • View Profile
Re: [XP] How to put Variable as Prize???
« Reply #2 on: April 10, 2012, 01:29:31 AM »
mm i dunno if i specified myself, in my game monsters drop elements like fire or water

so i want it to be able to specify a monsters drop in variable

Example:
Variable2=Fire
Monster1=+1Fire drop
Monster2=+2Fire drop

Instead of having the "teasure"(database name) as an item, have a teasure of variable

Offline Calintz

  • Guardian of Chaos
  • ********
  • Posts: 3803
  • LV: 108
  • Gender: Male
  • A Pixel's Worst Nightmare
    • View Profile
Re: [XP] How to put Variable as Prize???
« Reply #3 on: April 10, 2012, 01:51:58 AM »
so you call the item's dropped by enemies "elements." these elements are actually items in your database though, right? you have an item called "fire," and another item called "water," and so forth?

Offline Rolandojis

  • Trained Member
  • *
  • Posts: 25
  • LV: -1
    • View Profile
Re: [XP] How to put Variable as Prize???
« Reply #4 on: April 10, 2012, 02:56:45 AM »
No they aren't items, I set them up as variables
variable 10 is Plant
variable 11 is Water
etc...

I want monsters to drop this "elements" each monster drops diferent amounts of elements that add up to the variable
so after killin 2 monsters that drop 3 water each, then variable 11's amount would be 6

Offline Calintz

  • Guardian of Chaos
  • ********
  • Posts: 3803
  • LV: 108
  • Gender: Male
  • A Pixel's Worst Nightmare
    • View Profile
Re: [XP] How to put Variable as Prize???
« Reply #5 on: April 10, 2012, 03:02:00 AM »
i don't understand why this is valuable? why would you want to set a variable that way? i don't understand why you wouldn't just make items that reflect the element you want the enemies to drop? anyway, i think that requires a script mod, and i wouldn't be able to do that for you. what battle system are you using? i don't think i can help you. sorry.

Offline Rolandojis

  • Trained Member
  • *
  • Posts: 25
  • LV: -1
    • View Profile
Re: [XP] How to put Variable as Prize???
« Reply #6 on: April 10, 2012, 03:20:59 AM »
well thnx anyways. umm the normal battle system

and I use this because the elements are used to create things or buy things.
Example:
You go to a specific place with 2 Plant and 1 wood and create Tree
You go to FlamingCrafts with 1 fire and 2 wood and create torch

I would do this with items but in conditional branchs only appears if you have a type of item in possesion, not a quantity of an item

Offline KK20

  • Master Scripter Fixer
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3143
  • LV: 378
  • Gender: Male
  • Choco Octo <3
    • View Profile
Re: [XP] How to put Variable as Prize???
« Reply #7 on: April 10, 2012, 03:51:41 AM »
I would do this with items but in conditional branchs only appears if you have a type of item in possesion, not a quantity of an item
Is there any reason why you can't just set a temporary variable to equal the quantity of the element? You can do that you know.
"Control Variables" => "Set" => "Item [Dropdown list] In Inventory"



Other Projects
RPG Maker XP AceUpgrade RMXP to RMVXA performance!
XPA TilemapTilemap rewrite with many features, including custom resolution!


Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Offline Calintz

  • Guardian of Chaos
  • ********
  • Posts: 3803
  • LV: 108
  • Gender: Male
  • A Pixel's Worst Nightmare
    • View Profile
Re: [XP] How to put Variable as Prize???
« Reply #8 on: April 10, 2012, 06:49:34 AM »
that would probably work. if you create an item for each element, and use a common event to constantly set the amount of each element in the inventory (use a switch to activate it at the beginning of the game) this would work. then the conditional branch could be used to check the quantity of each element in the inventory.