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

Items=Auto use guns

Status
Not open for further replies.
Level 5
Joined
Dec 11, 2010
Messages
101
Right-Click use Item *Trigger Help*

Ok, i have run into a bit of a problem...but its simple i guess in a way.

I am needing help with a easy to do (copy and paste) trigger where when you right-click a enemy unit, it will use the item in slot 1 and use 1 charge. But every time i make a trigger to do it, nothing happens. *And if i have a machine gun for example, how do i make it so it uses the item in slot 1 til the target enemy is dead?*

(P.S.- Wepons all have difforent ranges.)

I am very close to finishing game (all i need is waves, buy-able guns, perks, and mystery box) and if you help me, i will give you credits in EVERY map i make.

(Note if you get the Mystery Box (hint hint) youll know what im talking about. Except ill use a difforent title.)

(P.P.S.-No variables or anything like that, which is very confusing to me)

Thanks to anyone who contributes.
 
Last edited:
Level 5
Joined
Dec 11, 2010
Messages
101
Left-Click use item in slot one

Ok, ive made a trigger that has a almost finish, but it doesnt work...

Event-Unit - A unit owned by Player 5 (Yellow) Is attacked
--
-Condition-(Unit-type of (Attacking unit)) Equal to (Unit-type of Survivor 0001 <gen>)
---
--ActionHero - Order Survivor 0001 <gen> to use (Item carried by Survivor 0001 <gen> in slot 1) on (Attacked unit)

So when i used this, it used the item just like i asked, but the range was based on what the Survivors normal range was..but ill have like 20+ weapons that have difforent ranges?? Any ideas on fix?
 
Last edited:
Level 5
Joined
Dec 11, 2010
Messages
101
ok i fixed it and no, its not what i was looking for. i dont like spamming the Z button just to shoot and then have to pick a zombie, unless thats a trigger error?

What i need is when you right click a zombie, it uses the item in slot 1...but ill have like 20+ guns all with difforent ranges.
 
Level 5
Joined
Dec 11, 2010
Messages
101
Alright, i worked on my map today and i fixed the trigger where i click a zombie, it attacks it.

But i ran into another problem. I need a simple and easy trigger where whatever gun is in your first slot, it changes how far away you can use the item. Or basicaly it changes your range? Mckill2009 your already in my credits btw.
Thanks :)
Thanks :)
 
Do this instead:

A unit is issued an order targeting an object

Issued order == smart

//And below this you either order the unit to use the item, or better, just substract one charge from the item and do the damage part with triggers.

"smart" is the type of order issued when you right click an object, while "attack" and "move" orders are only issued of you use the attack or move abilities in your command card.

EDIT: if you don't "like" variables, then you are never going to be able to code anything, EVER. Just get on your ass and learn it, since it is one thing that will appear in every programming language concieved by man (not to mention in the most basic math).
 
Status
Not open for further replies.
Top