Warcraft III resources & community, 2003–2006 · archived

I NEED HELP!

10 posts
#1

I NEED HELP!

I NEED HELP!
I was wondering how it is possible to make it so that when you pick up an item(ex.handgun),it makes the units attack ranged on both land and air units. What i want to do is make it so my peasant be able to defend himself with a handgun in a custom map. :roll:
So if possible PLZ help... :cry: :cry:
#2
Though there's no trigger that can deactivate one of the both unit attacks, I don't find a really good solution. Perhaps later I have some time and take a second look.
#3
You can make a new model with the requested attacks and use the replace unit trigger. If you paste all relevant unitvalues like exp hp mana etc you can create the illusion that the unit puts on the weapon...
#4
That works for getting the wep but what about when they drop or sell the wep?Your plan would not work......
#5
So when he drops or sells the gun make it that the unit is replaced with the one without ranged attack.
#6
yes he is right! you have to replace the unit everytime it weaponbehavior changes...
#7
Should be working. But remember giving the replaced hero a dummy item, else he won't be able to drop his weapon (logical, or? :wink: )
#8
I found out a funny bug: In of my maps i used changeable weapons and worked with attachments i used array varies to store the carried items and used a "run for each integer a from 1 till 6" funtion the itemtypes where stored correct(I tested with scoreboard). But if i ordered to create for each integer a from 1 till 6 the stored itemtypes to the replayced unit nothing happened... after i putted a 0.01 s wait in the trigger worked... Strange isnt it? declarieng variabled shouldent need much performance, should it?
#9
TY!
I finally got it to work... :D :D :D
#10
@Master Modmaker: That is an interesting bug. I've also found sometime that triggers don't work very well with declaring variables without a wait action. Maybe Blizzard is trying to screw us all over? lol.