| 12-09-2006, 03:04 AM | #1 |
Can someone give me a function that increases range of a unit and then another which decreases? I can't seem to figure it out, but what I would like is this: Increase range of (Hero manipulating item) by 100. Decrease range of (Hero manipulating item) by 100. Each a seperate function. |
| 12-09-2006, 03:06 AM | #2 |
Only way to do this is via upgrades, which are perminant, messy and ineffecient. |
| 12-09-2006, 03:17 AM | #3 |
I was looking at the upgrades, because thats how I thought you would approach it since I looked through the JASS Vault for some functions. Couldn't find any but when I was looking at the upgrades it had no place to select which unit the upgrade effects. Any idea how I can get it to effect more then just riflemen? |
| 12-09-2006, 10:21 AM | #4 |
To make it effect a unit, first you need to go on the unit via Object Editor, and select the Upgrades used near the bottom, and add that upgrade. But as Pheonix-IV, upgrades are perminant, you cannot unlearn a upgrade, once it has got the range, it will not be able to decrease in range with that upgrade. You will need to use 2 upgrades, one with -range and one with +range with a shitload of levels, which is ineffiecent. My vote is chaos/morph the unit into a copy of the unit which has increased range, and revert it back when you want the range lower again. |
| 12-09-2006, 07:31 PM | #5 |
If you want to do it more instantaneous (because morph -not sure about chaos- has somewht of a casting time) you could just store the unit's items/stats in variables within a function, and remove the unit via RemoveUnit then add the other unit via CreateUnit (which is much faster than Blizzard's CreateNUnits thing) and then give the newly created unit all of the previous unit's stats. If CHAOS doesn't have a cast-time then use that, but I'm not sure how much players would enjoy waiting a second or two after picking up an item (or whatever gives them the range). |
