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

Item Building spell help

Status
Not open for further replies.
Level 2
Joined
Apr 8, 2008
Messages
7
Ok what im trying to make is a spell that builds a building but only works when you have a certain item in your inventory. How would i go about doing this?

example: a hero has an item called "chair" in his inventory and has the "build" ability. When you click the "build" ability the chair building pops up and you can build it. Once you build a chair building, the "chair" item in your inventory goes away and you cant build another chair building untill you get another chair in your inventory.

its kind of like the buildings in dark deeds how you can only build one of each then they dissapear from the building section untill you destroy the one already created.

THANKS FOR THE HELP! :grin:
 
well your gonna have to modify this but this is a rough proto-type that i made in like 30sec (if you like/modify give credit if you want.P.S-you need to make this for all the iteams and the If-Conditions for every player in your map(1-12 or w.e)
  • Building
    • Events
      • Unit - A unit Is issued an order targeting a point
    • Conditions
    • Actions
      • Set - Caster = (Casting Unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item carried by Caster in slot 1) Equal to (Item carried by Caster of type (your iteam here)
        • Then - Actions
          • Unit - Add (the build spell) to Caster
        • Else - Actions
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
OMG.
The simplest way:
Make the item based on tiny hall or the other items that are building that as stated above, blizzard already created.
Voala done.

Anyways some more stuff:
And the trigger above has nothing to do with this.
A unit Is issued an order wtf??? why ???
Also this trigger will run every time you issue an order and there are no conditions ...
If you want to have it an ability then the event should be:
A unit acquires an item
condition:
Item being manipulated equals to (the item)
Actions:
Add ability(your ability) to the unit manipulating the item
Giving the unit a build skill.
Make a trigger for when the building is built.
A unit starts the effect of an ability
actions:
Remove the item.
But this will require a lot of triggers, for every item such you will have so generally the blizzard way is easier.
 
Level 2
Joined
Apr 8, 2008
Messages
7
thanks for all the help guys :thumbs_up:
i was trying for something a little different than the blizzard tiny hall idea but sence this way takes too many triggers and that my lag game a little bit then ill just go with the tiny hall :cool:
THANKS!
 
Status
Not open for further replies.
Top