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

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)
 
Level 5
Joined
Nov 14, 2004
Messages
159
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?
 
Level 6
Joined
Feb 18, 2005
Messages
263
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)
 
Level 3
Joined
Feb 12, 2006
Messages
21
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.
Top