Recent content by muzk

  1. M

    Global Group, could generate random bugs?

    Hello, I want to know if the following kind of code could fire random bugs in a map globals group ENUM_GROUP=CreateGroup() endglobals function SomeFunc takes real x,real y returns nothing local unit e call GroupEnumUnitsInRange(ENUM_GROUP,x,y,500,null) loop exitwhen...
  2. M

    Snippet GetNearestUnit

    Oh yeah, I forgot about "u" leak, using a global may solve it. Not necesary null "e", because loop condition is exitwhen e==null, so e is null when loop ends.
  3. M

    Snippet GetNearestUnit

    Why not just: globals private constant real MAX_DIST_POW = 99999999 endglobals function GetNearestUnit takes real x, real y,real r, boolexpr c returns unit local unit u local unit e local real du=MAX_DIST_POW local real de call...
  4. M

    System Damage

    Finally... thx!
  5. M

    System Damage

    I don't get it yet ... :( I can't see the recursion there D:
  6. M

    System Damage

    :D function UnitDamageTargetEx takes unit whichUnit, widget target, real amount, boolean attack, boolean ranged, attacktype attackType, damagetype damageType, weapontype weaponType returns boolean local boolean result set TypeStackLevel=TypeStackLevel+1 set...
  7. M

    System Damage

    globals private integer BlockNum=0 private unit array BlockUnit private real array BlockUnitLife private real array BlockRedamage private unit array BlockDamageSource private timer BlockTimer=CreateTimer() endglobals Does...
  8. M

    Shop unit selection

    Hello. How can I "add priority" to Shop Unit Selection? For example in DotA, shops select your Hero and animal courier (unit with inventory) over your circle selector (another unit with inventory).
  9. M

    Unit Bonus Movespeed

    Is there a way to make an aura that upgrades levels fast? I tried using endurace aura to do an unit bonus speed. That aura increased 1 level each seconds for 10 seconds (10 levels), but it is too slow and doesn't show the buff level changed (it saids the level) between level 1 and 5. Then I...
  10. M

    System Assist v 1.0

    Thx for reading. I changed a bit the documentation. I'll continue tomorrow ;)
  11. M

    System Assist v 1.0

    What you meant with O(n)? Oh, I forgot, added ;)
  12. M

    System Assist v 1.0

    I'm using it because I don't wanna use 1 player force for each unit registered, also, you cant just use an array cuz you will reach max instances. You should use it cuz its very flexible, you can add your own actions in event response functions like increase the death/killer/asssist count for X...
  13. M

    System Assist v 1.0

    Oh yeah, AssistSpellModule will "bug" with status, you have to do sth like this: if Assist_isUnitRegistered(t) and IsUnitEnemy(t,who) and GetUnitTypeId(GetTriggerUnit())!=DUMMY__UNIT_ID then Anyways, that is an optional module. You can use Assist[unit].registerPlayer(player) whenever you want
  14. M

    System Assist v 1.0

    Yup, another Assitance System. I was looking for an Assistance System that don't use Forces or units groups, I didnt find so I created this one. Requires: - NewGen Editor - AIDS - TimerUtils - Damage - GetPlayerNameColored (it is just for displaying colored messages) Pros - Doesn't use...
Top