HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Changing armour in game

10-08-2008, 12:15 PM#1
rizla
Sup everyone, hit a little bit of a snag while modifying the aaa inventory system. Just wondering if its possible to change a units armour classification in game without replacing the unit. I'm hoping to allow the system to set a units armour to heavy if it is equipped with heavy armour. Thanks in advance.
10-08-2008, 12:26 PM#2
Anitarf
As far as I know you'd need to replace the unit.
10-08-2008, 12:39 PM#3
Toadcop
you can also try to import a Slipknot tune in the map and let it change the armor type ^_^

btw you can use upgrades... but the best way is the chaos (morph)
10-08-2008, 01:09 PM#4
rizla
I actually thought of importing a Children of Bodom track vut the map is already borederline on size so its pretty much a long loat dream at the moment. Who knbows, if I manage to make it smaller I just moght do that ;D.
Can you give me details on how to use upgrades (Can the upgrade be undone? Say the unit drops its armour, it must then return to an unarmoured class). Why is using the chaos morph ability better? The thing is that a unit might pick up light armour, or it might pick up Heavy armour. So it needs to be very flexible.
10-08-2008, 01:18 PM#5
Toadcop
Can the upgrade be undone? not really thats the problem =\ (you can try to fake with other upgrades etc. lvls...)
the Chaos ability is the most proofed way imo...
10-08-2008, 01:53 PM#6
rizla
so how would i go about using the morph ability?
10-08-2008, 02:01 PM#7
Blubb-Tec
Just for the record, there is NO way to UNDO the armor upgrade, and it has a really sucky mechanism too, so depending on what amor the unit has and what armor you want to switch that might not even be possible, but in other cases you're able to switch armor 6 times, but each time it has to be a different one.
The upgrade works like, every armor type is indexed from 0 to 7(not sure), and the upgrade is only able to increase the armor-index of one unit, but there is no way to decrease it again.
10-08-2008, 02:28 PM#8
Alevice
chaos ability transforms immediately an unit into another. so you would have unit A wearing light armor, and then with chaos you transform it into unit B, which is identical to A, except it wears heavy armor. if you want him wear light armor again, just have another chaos based ability that transforms him into unit A again.

Root changes armor, but I don't think it'll work as you want it to.
10-08-2008, 02:33 PM#9
Anitarf
Quote:
chaos ability transforms immediately...
That's the only problem of chaos, it doesn't really change immediately. There's a very slight delay to it which sucks in some cases (I had this problem when I tried to chaos-morph a normal unit into a unit with mana and then set the mana of the new unit to a certain value, I had to wait a bit before I could actually modify the new unit's mana). The problem is that a 0.0sec time ris not enough, you actually have to wait a duration, I just ended up using TriggerSleepAction(0).
10-08-2008, 02:57 PM#10
rizla
So theres really no easy way to do this... That sucks. You'd think blizzard would icoroporate something like this into their game. Oh well. I guess I'm going to have to use the chaos idea. A bit of a delay isn't serious. Is there a problem with this spell. I read somewhere that if a certain unit isn't used it will crash the game. Or is that the morph ability
10-08-2008, 03:17 PM#11
Alevice
Quote:
Originally Posted by Anitarf
That's the only problem of chaos, it doesn't really change immediately. There's a very slight delay to it which sucks in some cases (I had this problem when I tried to chaos-morph a normal unit into a unit with mana and then set the mana of the new unit to a certain value, I had to wait a bit before I could actually modify the new unit's mana). The problem is that a 0.0sec time ris not enough, you actually have to wait a duration, I just ended up using TriggerSleepAction(0).

I presume the " starts the effect of an ability" event (or even perhaps "unit enters region") doesn't work with it?
10-09-2008, 12:54 AM#12
dead_or_alivex
Try Berserker Upgrade, maybe? It's a Chaos-like ability, but I've used it without problems for such things in the past.
10-09-2008, 09:51 AM#13
rizla
I've tried the chaos ability and it works fine except for one salight little (or actually quite a big problem) it increases the units armour and damage each time tis used... Almost doubling it. Thats a huge bug when it comes to an armour system. Is there a way to prevent this? Or am I going to have to remove the units damage altogether and then re add it.

Quote:
I presume the " starts the effect of an ability" event (or even perhaps "unit enters region") doesn't work with it?

It might work but I think it might still have that delay. After all it removes the unit and replaces it.
10-09-2008, 11:50 AM#14
dead_or_alivex
Uh, it morphs the unit it is added to into another unit. It doesn't affect armour or damage in any other way; did you check the armour and damage of the unit being morphed into?
10-09-2008, 12:50 PM#15
Anitarf
Read the chaos chapter of the WarcraftIII Ability Guide, it describes your problem in more detail.