| 02-23-2007, 10:02 AM | #2 |
You got it backwards, actually. When implementing a JASS scrtipt, whatever is blue you omit (leave out) and you replace the whichunit etc. with your unit/integer/whatever. The ability code is, yes, a hex-code like you wrote. But it must be between apostrophies (these things: ' ). So it would look like this: 'A00H'. If you wanted to get the level of a unit's ability in jass, you would use GetUnitAbilityLevel( whichunit, abilcode ). For "whichunit", you'd use GetTriggerUnit() in your case. "Abilcode" is, again, just the rawcode of the ability you want to get the level for. You may also use variables for integers and whichunits, but remember that when you use a variable you've made in the variable editor, you must add the prefix "udg_" to it in the script. Pretty simple, and a demonstration line is: JASS:call SetUnitAbilityLevel( udg_Tamed_pet_unit, 'A000', GetUnitAbilityLevel(GetTriggerUnit(), 'A00H') ) As for the setting the health ability thing, it's actually a bug, and is discussed by Blade.dk here. Oh, and use "A unit starts the effect of an ability" instead of "A unit finishes casting an abilty", unless it's a channeling spell ![]() |
| 02-23-2007, 02:43 PM | #3 |
Oh, btw when you said "Footman 001 <gen> whichUnit" You cannot use that, it is not a variable, but a name. Footman 001 <gen> is a label the WE gives to each preplaced unit (if it says <gen> its preplaced). To get a units real "name" if you like, you should use GUI and do something like "Unit - Kill Unit, and put your unit that you want to find out's real name there, convert to Jass, and you should see it something like "gg_unit_pala_001" or something, that was a random guess btw. But Footman 001 <gen> will not work. |
