This has been bugging me a lot lately. I am already a fourth of the way done with my terrain for a survival based map, however I am not sure how to do some of the triggers yet...
Basically, as an example, you need to make a fire to keep you warm and cook your food. I want the ability to take a stick, some tinder, and flint, and press the "make" button, and you get a fire that you can place.
I've played around with the triggers, and so far I can't figure out how they did it in other maps, or even how I can give an item to a unit with an inventory at all.
Remove Item of Type from Slot, I think that's the function, you'll have to have the components in certain inventory slots. You'll have to write that in the description.
event: a unit sells an item condition: buying unit is hero equal to true actions:
for loop b from 1 to (max amount of items) set boolean[b] to false
for loop a from 1 to 6 if item carried by buying unit in slot a equal to flint, set boolean[1] to true if item carried by buying unit in slot a equal to stick, set boolean[2] to true if item carried by buying unit in slot a equal to tinder, set boolean[3] to true
if bollean[1] = true && bollean[2] = true && bollean[3] = true then for loop b from 1 to 6 - remove item carried by buying unit in slot b create fire for buying unit
by the way, are u trying to copy "ice troll tribes"???^^ if ur using another event, just change the other stuff use boolean[x] to refer to other items too
lol. now i am working with my map, that uses ice and jungle trolls thinhs. tinder, flint, stick... you must create this trigger:
event unit casts ability condition ability being cast equal to "build button" action if all conditions are true do then actions cond: type of item carrying by hero in slot 1 = tinder cond: type of item carrying by hero in slot 1 = flint cond: type of item carrying by hero in slot 1 = stick then action: hero - remove item from hero from slot 1 then action: hero - remove item from hero from slot 2 then action: hero - remove item from hero from slot 3 then action: hero - create item fire camp and give to hero
lol, i am working on similar map how many buildings you map have? if you need to help with building sharing, tell me, i will help you!
If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions Or - Any (Conditions) are true Conditions (Item-type of (Item carried by (Picked unit) in slot 1)) Equal to Hammer [level 1] (Item-type of (Item carried by (Picked unit) in slot 1)) Equal to Hammer [level 2] (Item-type of (Item carried by (Picked unit) in slot 1)) Equal to Hammer [level 3] (Item-type of (Item carried by (Picked unit) in slot 1)) Equal to Hammer [level 4] (Item-type of (Item carried by (Picked unit) in slot 1)) Equal to Hammer [level 5] (Item-type of (Item carried by (Picked unit) in slot 1)) Equal to Hammer [level 6] (Item-type of (Item carried by (Picked unit) in slot 1)) Equal to Hammer [level 7] (Item-type of (Item carried by (Picked unit) in slot 1)) Equal to Hammer [level 8] (Item-type of (Item carried by (Picked unit) in slot 1)) Equal to Hammer [level 9] (Item-type of (Item carried by (Picked unit) in slot 1)) Equal to Hammer [level 10] (Item-type of (Item carried by (Picked unit) in slot 1)) Equal to Hammer [level 11] (Item-type of (Item carried by (Picked unit) in slot 1)) Equal to Hammer [level 12] (Item-type of (Item carried by (Picked unit) in slot 2)) Equal to Stone (Item-type of (Item carried by (Picked unit) in slot 3)) Equal to Stone (Item-type of (Item carried by (Picked unit) in slot 4)) Equal to Stone (Item-type of (Item carried by (Picked unit) in slot 5)) Equal to Lumber Then - Actions Item - Remove (Item carried by (Picked unit) in slot 2) Item - Remove (Item carried by (Picked unit) in slot 3) Item - Remove (Item carried by (Picked unit) in slot 4) Item - Remove (Item carried by (Picked unit) in slot 5) Hero - Create Ready Light Armory and give it to (Picked unit) Else - Actions
it is my code, i do not use button build. i using hammer item for building anything
There are many survival maps, Troll Tribes being one of them, however I am more interesting in a certain Wilderness Survival (that's the actual name, however it is shared by several other maps).
Basically instead of everything being in certain slots, in this map, if the unit is carrying them at all, it will remove them and replace it with something else.
How can I do that?
EDIT -Okay, I got it to work, kind of. I have it so no matter what slot it is in, it will disapear, however even if the right items are not in there, it will still give me the item I am trying to create...
There are some limitations, like one crafer/alchemist/recipe_user per player, but they can be easily bypassed if you're willing to write some code. Basically instead of having all items in inventory and using spell, user has to click on items in correct order. If i remember correctly there are comments in the map, so it should be fairly easy to figure out how to add your own items/recipes.