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

Need Help with an item trigger

Status
Not open for further replies.
Level 3
Joined
Feb 12, 2006
Messages
21
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)
 
Ok i got the part where it minuses 1 lumber from you when you use it but i cant get hmm to not be able to use it when he reaches 0 lumber
 
Status
Not open for further replies.
Back
Top