| 02-01-2003, 10:51 PM | #1 |
Is it possible to get the level of a non hero unit and manipulate it in a variable? This would help in creating my custom EXP/Stat system. I have 10 levels of EXP set EXPforLevel[1] " EXPforLevel[10] now if I could find the level of a unit and pop it into the array number (say level 5, would then give level 5 exp) upon killing after doing the radius check for who actually gets the EXP. So is this possible? |
| 02-01-2003, 11:36 PM | #2 |
Well I don't know of any simple way of doing this. The only idea I can come up with atm would require a bit of effort. Map Initialization: Pick every unit in playable map area owned by enemy of (Your team) and add picked unit to Unit Group Organize. Every 2 seconds If Unit Group Organize is Empty then turn off this trigger Add unit of type (random level 1 creep type) to Unit Group LvlOne Add unit of type (random level 2 creep type) to Unit Group LvlTwo " " " " " " " " " 3 " " " " " " " " LvlThree Etc... to 10 / LvlTen Wait 0.1 Remove All Units in LvlOne from Organize Remove All Units in LvlTwo from Organze Etc.. to 10 / LvlTen Now, I don't know if it will recognize units that aren't neutral hostile units. You also shouldn't use Unit Group arrays if you do this, but rather a seperate for each. Other than that, it should work. |
| 02-01-2003, 11:42 PM | #3 |
You can sort of cheat, by setting the Point Value of unit to whatever the unit level is. This you can easily check with a trigger, though it does take you modifying the point value of every unit type you are using. |
| 02-01-2003, 11:43 PM | #4 |
that might work, but the levels of units I want are not creeps so it wont work for what I need it for, thx anyways |
| 02-02-2003, 12:07 AM | #5 |
Alexian, you know what THAT might work, if I set the point base to 1 for level 1 units I can use that.... hmm |
