• 0

    posted a message on [Trigger, Data] Item Recipe/Combining System Tutorial

    @OneTwoSC: Go

    No problem ;)

    Also, I will be updating the system to make it a lot less tedious, more compact and portable as soon as they fix the "Allow Multiple" option for customs function's parameters. As far as I know, its a known bug and I haven't been able to use this feature. If anyone knows a workaround or how to use it please let me know.

    TheFreak.

    Posted in: Tutorials
  • 0

    posted a message on [Trigger, Data] Item Recipe/Combining System Tutorial

    @Vortexx2010: Go

    Hmm I am not really sure what you mean, I did it with "Inventory slot of " and it works fine, it assigns the slot numbers as I explained the the tutorial.

    If you want to, you can share some pictures or something and I can try to find out whats going wrong.

    TheFreak.

    Posted in: Tutorials
  • 0

    posted a message on I can't figure out how to create a Switch

    @Mesden: Go

    No problem and GL with your map.

    TheFreak

    Posted in: Miscellaneous Development
  • 0

    posted a message on I can't figure out how to create a Switch

    @Mesden: Go

    Yeah, You have to update your switch variable outside of the switch statement. Also, don't forget to turn off the trigger in the last stage.

    TheFreak

    Posted in: Miscellaneous Development
  • 0

    posted a message on I can't figure out how to create a Switch

    @Mesden: Go

    In the case that you want to have several stages you are better of with a Switch statement. Just add a case for each stage you want and set the corresponding actions for that state i.e. Create Archon in stage 3. When you reach the last stage you turn off the switch.

    Remember to initialize the switch variable to 1 or else, this won't work.

    TheFreak

    Posted in: Miscellaneous Development
  • 0

    posted a message on Can anyone clear up some of the f***ing confusion for me?

    I don't see why it would do anything when someone leaves, or any other time for that matter, as your triggering event is Game - Map initialization and that only happens once.

    Also, I would suggest some patience when asking for help .

    TheFreak

    Posted in: Miscellaneous Development
  • 0

    posted a message on I can't figure out how to create a Switch

    @Mesden: Go

    Ok sorry for that I am back.

    I attached a picture of what it should look like.

    @Sceptilesolarbeam: you should be more careful/specific when calling others wrong.

    TheFreak

    Posted in: Miscellaneous Development
  • 0

    posted a message on I can't figure out how to create a Switch

    You are using 2 variables. You only need one and only 1 Trigger. Say your Variable is called Switch. then in your trigger you go like "if switch == 1" do this ( Including spawning units and incrementing switch) else ( spawn the other type of units and disable the trigger). For this to work you have to initialize the global variable "switch" to 1.

    TheFreak

    Posted in: Miscellaneous Development
  • 0

    posted a message on I can't figure out how to create a Switch

    @Mesden: Go

    Hello there.

    Your problem is that you are using local variables to keep track of states and you can not do that since local variables are gone after the trigger is completed. What you want to do is create a global variable and set it to a default, say "1" and then make just 1 trigger that checks whether the variable is 1 or not. If the variable is 1 you spawn the appropriate unit and increment the variable then if the variable is anything else/or 2 you spawn the appropriate unit and increment the variable/disable the trigger.

    Hope it helps.

    TheFreak

    Posted in: Miscellaneous Development
  • 0

    posted a message on Looking for Icons Artist

    Hello guys,

    I am looking for an Icon Artist to make custom Icons for items and abilities to be used in a map we are working on.

    The map is based on the Troll Tribes series from Warcraft 3. We are improving over existing features and adding some new interesting mechanics.

    It would also be very nice if we could find a Static Modeler for custom items models but that is not as important right now.

    If you are interested in working with us either for Icons or Models ( Or both), please reply or send me a PM.

    TheFreak

    Posted in: Team Recruitment
  • 0

    posted a message on [Trigger, Data] Item Recipe/Combining System Tutorial

    5.1

    Here you can see 3 changes, 2 are important.

    First, I used an "If Then Else - if" instead of the regular "If Then Else". This is just equivalent to nesting several "If Then Else" together. Just choose "If Then Else - If" from the function list and press ok, right click on "If Then Else" and add a new action for each ingredient your recipe uses. You will see that each time you create an action, it automatically creates the place for the respective conditions.

    Second, I added a condition that checks for No Unit. This is to know whether or not that ingredient has been found already.

    Lastly, you can see I changed all the other conditions for "Validate Ingredients". This is just a custom condition that does the same as I had it before but makes it look cleaner.

    Now the system should work with recipes that require more than 1 of an Item Type. ( e.g. 2 "Zerg Glands" )

    TheFreak

    Posted in: Tutorials
  • 0

    posted a message on Recipe system

    @Windflamedmon: Go

    Hello,

    You might want to check Item Recipe/Combining System

    Hope it helps.

    TheFreak

    Posted in: Miscellaneous Development
  • 0

    posted a message on [Trigger, Data] Item Recipe/Combining System Tutorial

    Hello guys, I am really new to this and specially to making tutorials but I just finished an Item Recipe/Combining system for a map I am working on and since I couldn't find anything in here related to the topic I decided to make a tutorial of how I did it.

    Also, I wanted to thank you all guys for the amazing tutorials/guide you've created. They have really help me to catch up fairly quickly. With that said, let's get to the job at hand.

    Pre-requisites: For this tutorial I assume that you did or at least have an understanding of Items & Loot video. ( Thanks to OneTwo for that) Items & Loot

    If you did follow OneTwo's video and actually made the map then you can easily continue using the same map for this tutorial, if not then you will have to go back and learn at least how to create Items.

    Steps: 1) I did my system a little bit differently from that of DotA and some other maps in the sense that the item is not automatically made when you pick up all the "ingredients" but you have to click a button to combine the item ( This made more sense for my project, gives more control and avoids some accidental combinations. If you want to have it DotA style you just have to make minor changes) . So first lets create a Button for combining Items. Pop up the Data editor, go to Data Type "Buttons", Right click on the list and click on "Add Object". Name the button, I use "Combine Items" in this case, click on "suggest" and then click "Ok"

    1.1

    After the Object is created, go to the fields and set an icon for it, I use the icon for "Decloack", I thought it was fitting. Optionally, but appreciated by players, you can set a tooltip that describes what the button does.

    1.2

    2) now we need to create a "dummy" Ability in the sense that the ability itself doesn't do anything but work as a trigger event. Now go to the Abilities tab in the editor and again create a new object. Give it a name, I use "Combine Items" again, click on "suggest", set the Ability Type to "Effect - Instant" and click "Ok". One note here, I use this ability type for the dummy ability because I thought it would work the best, I am new to the editor so if you know of a more fitting type for the job please let me know.

    2.1

    After the object is created, we need to modify some fields. First go to " Ability - Commands +" and double click it. A new window pops up. Click on "Execute" and change its state to "Available". Scroll down and set its "Default Button" to the Button you created in step 1, "Combine Items" in this case, then click "Ok".

    2.2

    Now go to the field "Command Card - Level Button - Image" and set it, I used "Decloack" again. Change the "Command Card - Level Button - Name" , I used "Combine Items". Lastly, I'd be nice if you set a tooltip, if you did in the previous step, you can just copy and paste the field.

    2.3

    3) Now we need to give the Ability we just created to an Unit. Go to the unit you created for the pre-requisite tutorial and double click on "Ability - Abilities +". A window pops up. Click on the green "X" and choose the Ability you created in step 2, "Combine Items" in this case, and click "Ok".

    3.1

    Now double click on "Ability - Command Card +" and another window pops up. Click wherever in the command card where you want your ability to be and then click on the green "X" to add a button. Look for the button you created in step 1, "Combine Items" in this case. For Command Type choose Ability Command, for Requirements leave (None), for Ability choose the ability you created in step 2, I used "Combine Items" and for Ability Command choose whatever you chose as a button for the beginning of this step, "Combine Items" in my case.

    3.2

    4) We created the button, gave the button to the new "dummy" ability and gave that ability to an unit ( I am using a Ghost btw). Now we need to go where the magic happens, and where is that? In Triggers of course! so go and bring up the triggers editor. Another note here, this is the first way I found how to do it so it's probably not the best or most efficient but I will keep working on it. If you find a way to make it better or know a different method altogether please let me know. With this method you need 1 trigger for each recipe you want to have. Go and right click to create a new Trigger or press Ctrl + T and give it a name. I named mine "Sword Recipe". Now right create a new event ( Ctrl + E) , it is going to be an Unit event. Look for "Unit Uses Ability" and click "Ok". For the parameters ( The colored links at the bottom) choose "Any Unit" uses (the ability you created in step 2) "Combine Items" at "Generic6 - Complete" stage ("Ignore shared abilities).

    4.1

    As you can see, here is where the" dummy" ability comes into play. Every time a unit uses it, it triggers the combination of items. Notice I use "Any Unit" because it fits into my map, you might have to add conditions or change the type of units according to your needs. Now, create a new Local Variable ( Ctrl + B) and give it a name, I use "Cloth Armor". Here local variables are going to be the "Ingredients" for the recipe ( Don't ask me how a cloth armor makes into a sword). so if you have multiple "Ingredients" make a local variable for each one. Set the type for each variable to "Unit" and leave the default to "No Unit". My recipe only has one "Ingredient" and does not require the actual recipe (The paper in DotA). If you want to have the paper as well just add it as another "Ingredient", given that you already made an Item and Unit for it.

    4.2

    Leave Conditions blank and go to Actions (Unless you need to do some adjusting as noted before). Create a new Action (Ctrl + R) and we are going to loop so choose "Unit Group - Pick each unit in Unit Group". Click on the argument ( green link at the bottom) and go to functions. Look for "Inventory Items Carried" Now you need another argument but it should default to "Triggering Unit" if it doesn't, set it to that.

    4.3

    Create a new Action for the Unit Group, specifically an "If then Else" Action. before I continue I need to add some context. This is what my inventory looks like

    4.4

    3 Slots (Upper) are for Equipped items and the remaining 8 slots are just bags. For the purpose of my map I only want the recipe to work with the items that are in the bags and not those equipped. So to avoid counting those items towards the recipe I add two "Comparison" conditions. Right click and add a comparison condition. For value 1 go to functions and choose "Inventory Item Slot". For the argument choose "Picked Unit" and for value 2 I choose a value of 13. Also, double click on "Operator" and change it to "!=".

    Here, I chose the number 13 because that is the index of one of my equipped items, so I don't want to consider it. Do the same as above again but choose 6 instead of 13, you can copy paste if you want and just change the number.

    (Note: if you want to use the same system, chances are that you won't have the same indices for your inventory slots. To figure what slot has what number, just know that the Top -Left corner is 0 and the index increases from left to right and from top to bottom. )

    Now add a third comparison condition, this time for value 1 go to functions and choose "Unit Type of Unit" as the parameter and for the second parameter choose "Picked Unit". Leave the operator "==" and for value 2 choose the type of unit for the first of your "Ingredients" I use "Cloth Armor". Don't worry if your recipe has more ingredients, I will do an example with 2 below. Add a new action under the "Then" section, choose "Set Variable" in functions and click "Ok". For the first parameter choose the Local Variable that corresponds to the Item you checked for in within the "if" block, "Cloth Armor" in my case. Leave the "Else" section empty. After all that, your Trigger should be looking something like this.

    4.5

    Now, outside of the Unit Group add another "If Then Else" Action. In the "if" section add a new Comparison Condition. For the first parameter go variables and choose your Local Variable. For the second parameter go to "preset" and choose "No Unit". Also, very important, change the operator to "!=" again.

    In the "Then" section add a new Action look for "Remove Unit" and for its parameter go to variables again and choose your Local Variable". Add a second action, "Wait" and use 0.2 game seconds. Add Another Action this time choose "Create Inventory Item". For the first choose the Item you want this recipe to make "Sword" in my case and leave "Triggering Unit" for the second parameter. Leave the "Else" section empty again. The whole Trigger should look like this.

    4.6

    Now, All this was for a recipe that required only 1 "Ingredient" so it was the simplest case. If you want to use more than 1 ( I really hope you do :P) then make the modifications so your trigger looks like this

    4.7

    Here I added an extra ingredient, "Zerg Glands". Notice that for each ingredient you add you need:

    1) A Local Variable of "Unit" Type.

    2) An "If Then Else" Block looking for the right ingredient in a valid location inside the Unit Group. (NOTE: For efficiency and in order for the system to work with recipes that require multiple items of the same type, each "If Then Else" block should be nested in the previous block and an additional condition should be added. See screeshot in next post)

    3) A Comparison condition in the second "If Then Else" block to check for the item existing.

    4) A remove action in the last "Then" section to remove the Ingredient.

    (Note: I don't check for the location of the Zerg Glands because the way I have it set up, they cannot be in an equipment slot, you should have the same if you followed OneTwo's Tutorial)

    Extras: If you don't want to use all the "Combine Items" Button nonsense, you can replace the event in your Trigger for this (The event is "Unit Manipulates Item"). 4.8

    If you can't figure out the index of your inventory slots. you can use this Trigger to help you. 4.9

    Lastly, If you did all this but don't have a clue of what you just did, I would recommend watching this good tutorial ( Thanks to Beider for that). Basics of Triggers

    PLEASE NOTE: this systems is highly in alpha, it hasn't been tested thoroughly and might contain a number of bugs. Please report if you find any and sorry for the inconvenience. It should work with recipes that require more than 1 of the same type of ingredient if you follow the 4 steps mentioned above for adding ingredients but again, I hasn't been tested.

    That's all, I hope you find this Tutorial useful and Thanks for reading.

    (UPDATE)

    Modified to work with recipes that require more than 1 of an Item Type.

    TheFreak

    Posted in: Tutorials
  • To post a comment, please or register a new account.