ok im making a map off of link to the past when he aquires the bow (item) he can click it and target a unit with it and shoot an arrow but heres the catch i want the lumber to be like how many arrows he has in his quiver so how do i make a trigger so that the abilty to use that item will cost 1 lumber and if he has 0 lumber he will be unable to cast it? (please give me the whole trigger)
Sound a bit more difficult, why not use "charged item" Bow instead? You could use item like "Arrow" lying around and click it act sort of like Tome of Experience but 0 exp, but with trigger adds up Bow's charges remaining?
Thats not tha much of a task. Here is the trigger:
Event: - a unit uses an item Condition: //if you would create your items, so that all bows(and only bows) are in one 'itemgroup' (like charged, permanent, campaign, ...) then the trigger would be one for all of them - Itemclass of (item beeing manipulated) = <your bow class> //otherwise if would be - OR - - Itemtype (Item beeing Manipulated) = bow 1 - - Itemtype (Item beeing Manipulated) = bow 2 - - Itemtype (Item beeing Manipulated) = bow x Action: - if - condition - - Player - Lumber of (Owner of (manipulating Unit)) > 0 - then - - Player - Add '-1' to (Owner of (Manipulating Unit)) current Lumber - else - - order unit (manipulating unit) stop
that one should work, even though i'd do it different. (no, i'll not say how i'd do it -> i don't have the time to write that stuff done right now -> if you want to now -> PM me and i might tell you)