• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Cookpot System for a map

Status
Not open for further replies.
Level 2
Joined
Apr 17, 2005
Messages
12
Ok, Ive got a question..I used the search tool for "recipe triggers" and found nothing, so Im sorry if this has been asked before.

I want to implement a system into my clan's map, Shodown Frenzy, where I can have the peasant build a cookpot with 4 item slots.

Say my hero has 2 Lesser Healing Potions. I have him put the 2 potions into the pot and it creates 1 Greater Healing Potion to give back to my hero when I want to. So like Island and Ice Troll Tribes, where you have to put a stick and 2 rocks into an armory to get a spear.

Can anyone at all guide me in making this dream come true? It would add a new dimension to our map, and I would do it with the help of my clanmates, but not many have the time to help with it, and Im very close to knowing nothing about WE. So if anyone can help, or if anyone doesnt understand what Im asking, I'd be more than happy to clarify.

If you want to contact me on Battle.net, Im on mostly on the weekends, but my screen name is ZulKhas. Or if you just want to post it here, thatd be great too. Thanks!
 
Level 2
Joined
Apr 17, 2005
Messages
12
I dont see a "if Acquired item =...", I see Picked Item is equal to, but then what do I do for the 2nd part?

(Picked Item) equal to (Value)

Is that half right? :\
 
Level 2
Joined
Apr 17, 2005
Messages
12
So this is some of what I've got:

Untitled Trigger 001
Events
Unit - A unit Acquires an item
Conditions
Actions
Item - Create Tome of Experience at (Position of (Triggering unit))

I couldnt put a match to what you told me and to what WE has in it. Sorry if this is easier than Im making it, Im just really terrible with WE triggering. :\
 
Level 5
Joined
Mar 12, 2005
Messages
117
this is how i did it with abilities

Event: Unit uses ability

condition:(and,Multiple conditions)

ability been used mix
item in slot 1 = heal small pot
item in slot 2 = heal small pot


Action: Remove items in slot 1 and 2
create big heal pot at point of casting unit
give last created item to unit (the unit that has the mix ability)

That will work
 
Level 6
Joined
Feb 18, 2005
Messages
263
I would do it like this:

event:
- a unit uses an ability
cond:
- ability beeing cast == 'cooking'
act:
set NotCooked = true
//do this if once for each possibl recepy
if
- and
- - boolean - var - NotCoocked == true
- - boolean - Unit has item of type 'weeds'
- - boolean - Unit has item of type 'water'
- - boolean - Unit has item of type 'mushrooms'
then
- unit remove item of type 'weeds'
- unit remove item of type 'water'
- unit remove item of type 'mushrooms'
- unit give item - 'mushroom soup'
- var - set NotCooked = false

and if you want to combine more than one item per type, i would recommend doing a loop through all it's inventory slots, increase a temporary integer variable and then checking if that variable is big enough.

set tmp_integer = 0
for - Integer A = 1 to (Inventory Slots of(Casting Unit))
- - if
- - - itemtype of (item in slot Integer A) == 'mushroom'
- - then
- - - set tmp_integer = tmp_integer + 1

and then, when you do the check for all the requirement sof a recepy add:
- integer - tmp_integer >= <your value>
then do the 'remove item of type' once for every <your amount> (if you need 3 mushrooms, remove a muhroom 3 times )


i hope this helped you
[/i]
 
Status
Not open for further replies.
Top