• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Wilderness Survivel: Craft Item?

Status
Not open for further replies.
Level 6
Joined
Jul 28, 2009
Messages
142
Hi guys! Can any one help me with this?


When my Hero have 2 Sticks and 1 Rock (Stick + Stick + Rock = Camp fire) and cast ability "Craft Item" I will get a Campfire. (Sticks and stone = DELETED)

Plzz help me with this.
 
Its pretty simple, but I will now try to go find the exact triggers for you.

Edit: Here it is.

ITEMCREATIONPIC.jpg


This should work just fine I think.
 
Last edited:
slot 1/2/3 will fail whenever the player has in other order..
but if you add many recipes, you must make sure there are no other STICK STICK ROCK in this exact order, or else the code will go mad (pick wrong items, make wrong item)
 
slot 1/2/3 will fail whenever the player has in other order..
but if you add many recipes, you must make sure there are no other STICK STICK ROCK in this exact order, or else the code will go mad (pick wrong items, make wrong item)

Well I don't really know how to do Item Creation that way. I've seen it be done before, but I have no idea how to do that...
 
Maybe try this?:

  • Events
    • Unit - A unit Begins casting an ability
  • Conditions
    • (Ability Being cast) Equals to Your Spell
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • ((Casting unit) has an item of type Stick) Equal to True
      • Then - Actions
        • Hero - Drop (Item carried by (Casting unit) of type Stick) from (Casting unit)
        • Item - Remove (Last dropped item)
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • And - All (Conditions) are true
              • Conditions
                • ((Casting unit) has an item of type Stick) Equal to True
                • ((Casting unit) has an item of type Rock) Equal to True
          • Then - Actions
          • Unit - Create 1 Camp Fire ect.
          • Hero - Drop (Item carried by (Casting unit) of type Stick) from (Casting unit)
          • Item - Remove (Last dropped item)
          • Hero - Drop (Item carried by (Casting unit) of type Rock) from (Casting unit)
          • Item - Remove (Last dropped item)
          • Your Actions
          • Else - Actions
            • Hero - Create Stick and give it to (Casting unit)
            • Game - Display to (Owner of Casting Unit) for 15.00 seconds the text: You don't have 2 Sticks and a Rock.
      • Else - Actions
        • Do nothing
Or simplified, without the first check if the hero has 2 sticks:

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • And - All (Conditions) are true
        • Conditions
          • ((Casting unit) has an item of type Stick) Equal to True
          • ((Casting unit) has an item of type Rock) Equal to True
    • Then - Actions
      • Unit - Create 1 Camp Fire ect.
      • Hero - Drop (Item carried by (Casting unit) of type Stick) from (Casting unit)
      • Item - Remove (Last dropped item)
      • Hero - Drop (Item carried by (Casting unit) of type Rock) from (Casting unit)
      • Item - Remove (Last dropped item)
      • Your Actions
    • Else - Actions
      • Game - Display to (Owner of Casting Unit) for 15.00 seconds the text: You don't have 2 Sticks and a Rock.
Hope it helps:)
 
  • Untitled Trigger 004
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Item-type of (Item being manipulated)) Equal to Claws of Attack +15
          • (Item-type of (Item being manipulated)) Equal to Crown of Kings +5
    • Actions
      • Set u1 = (Triggering unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (u1 has an item of type Crown of Kings +5) Equal to True
        • Then - Actions
          • Set i1 = 0
          • For each (Integer loopA) from 1 to 6, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Item-type of (Item carried by u1 in slot loopA)) Equal to Claws of Attack +15
                • Then - Actions
                  • Set i1 = (i1 + 1)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • i1 Equal to 2
                    • Then - Actions
                      • Item - Remove (Item carried by u1 of type Claws of Attack +15)
                      • Item - Remove (Item carried by u1 of type Claws of Attack +15)
                      • Item - Remove (Item carried by u1 of type Crown of Kings +5)
                      • Hero - Create Kelen's Dagger of Escape and give it to u1
                      • Skip remaining actions
                    • Else - Actions
                • Else - Actions
        • Else - Actions
 
Thx all! +Rep

Wait.. Ikithe, The varabie, "itemCreatorUnit" is Varabie type Unit, Right?

That's correct, the variable is the unit that would be casting the MAKE ITEM spell, which means it has to be a Unit Variable.
 
The first stick has to be in slot 1, that's the botom left slot of the 6, the other stick has to be in slot 2, that's the botom right slot, then the rock has to be in slot 3, that's the middle left slot, if any of those are not in the right place, the trigger won't start.:) Try puting them in the right slots and then try, or try to use mine or maker's triggers. Hope it helps:)
 
You could try allowing players to place items onto other items, replacing the items with a single package that could be added to. Once a package contains the necessary item recipe it can be activated to craft the associated combination item. This would require quite a bit more work, though.

If you want to go with a more simple approach then why not try something similar to what The DooM has suggested except check the unit's inventory in some sort of an order so that items placed in the first slots will be considered for combination before items in the last slots. Also each time this "Craft" ability is used I would recommend stopping the crafting process once a single item has been crafted, to avoid unintended items being merged.
 
...check the unit's inventory in some sort of an order so that items placed in the first slots will be considered for combination before items in the last slots. Also each time this "Craft" ability is used I would recommend stopping the crafting process once a single item has been crafted, to avoid unintended items being merged.

And that's what my trigger does :)
 
Status
Not open for further replies.
Back
Top