• 🏆 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!

[Solved] Crafting System

Status
Not open for further replies.
Level 13
Joined
Oct 25, 2009
Messages
995
Anyone can help me the Crafting System?
  • Untitled Trigger 001
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Channel
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) has an item of type Stones) Equal to True
          • ((Triggering unit) has an item of type Wood) Equal to True
        • Then - Actions
          • Hero - Create Tiny Great Hall and give it to (Triggering unit)
          • Game - Display to (Player group((Owner of (Triggering unit)))) for 10.00 seconds the text: You have crafted a ...
          • Item - Remove (Item carried by (Triggering unit) of type Stones)
          • Item - Remove (Item carried by (Triggering unit) of type Wood)
        • Else - Actions
          • Game - Display to (All players) for 10.00 seconds the text: You didn't have the...
How can i craft the great hall with Stacked Items.
Stacked Items mean this.

Explain:
The First Inventory is bone,2nd is wood
First,i use these items to craft the Great Hall,

Crafting%20Items.jpg

After that,i used the resources,it less wood x1
Crafting%20Items%202.jpg

Sorry for my bad english :x

Anyone can help? +REP
 
Level 6
Joined
May 11, 2010
Messages
236
Well i'm unsure of exactly what you need help with, but instead of removing the items (assuming the town hall only costs 1 of each?) you can use this to reduce the number of charges in the item.

  • Item - Set charges remaining in (Item carried by (Hero manipulating item) of type Bone) to ((Charges remaining in (Item carried by (Hero manipulating item) of type Bone)) - 1)
  • Item - Set charges remaining in (Item carried by (Hero manipulating item) of type Wood) to ((Charges remaining in (Item carried by (Hero manipulating item) of type Wood)) - 1)
And if it costs, say 4 bone to make a town hall, you can check how many charges remain in the resource
  • (Charges remaining in (Item carried by (Triggering unit) of type Wood)) Greater than or equal to 4
Hope this helps.
 
Status
Not open for further replies.
Top