• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Recipe system

Status
Not open for further replies.
Level 4
Joined
Dec 10, 2008
Messages
59
I'm not very sure if this should be tagged as trigger or JASS, but since I'm more familiar with GUI, i'll tag it as such :D

I've been playing a few maps made by the wonderful community of Hive lately, and I noticed that most maps used the "Nearby Patron" concept and follows the standard recipe system (buy recipe, buy required items, drop items if full, pick up recipe, get combined item).

I also noticed that DotA uses a different way for handling recipes, no "nearby patron" is required and then recipes can combine even though the inventory of a Hero is full. My question is, how do you do that?

I'm assuming a dummy hero is present?

Thanks in advance :wink:
 
Level 15
Joined
Sep 3, 2006
Messages
1,738
Well you make 2 versions of an item...

The first one is the one you buy, which is a tome. If you have full inventory then they create the second item on the ground (which is the real item). If you don't have full inventory then they create the second item and give it to your hero.

Every time they do this, check if you have the correct recipe requirements for anything that that item can mix with. If you do, then you get the recipe. If not, you just get the item.
 
Level 4
Joined
Dec 10, 2008
Messages
59
Well you make 2 versions of an item...

The first one is the one you buy, which is a tome. If you have full inventory then they create the second item on the ground (which is the real item). If you don't have full inventory then they create the second item and give it to your hero.

Every time they do this, check if you have the correct recipe requirements for anything that that item can mix with. If you do, then you get the recipe. If not, you just get the item.

Thank you very much! Anyway, just a quick question: If you have an empty inventory with the required items and you bought the "tome" recipe, what I'd have to do it remove those required items and give the Hero the actual combine item, right?

Also, which recipe system do you recommend in the Hive?
 
Level 15
Joined
Sep 3, 2006
Messages
1,738
Thank you very much! Anyway, just a quick question: If you have an empty inventory with the required items and you bought the "tome" recipe, what I'd have to do it remove those required items and give the Hero the actual combine item, right?

Also, which recipe system do you recommend in the Hive?

1) Yes, that's correct.
2) I've never really used a recipe system from the Hive. I highly suggest using a JASS one though if you're comfortable enough. If not, GUI is just as well.

@reason 3, I'm not planning on it anytime soon. You can always look at tutorials though.
 
Status
Not open for further replies.
Top