Search results

  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...
  15. M

    Aura giving buff instantly?

    Leave: Just remove the buff manualy using call UnitRemoveAbility(your unit,your buff rawcode)
  16. M

    Detecting if Real is an Integer

    did you tested? anyways we are comparing with the integer part I dont see your point :(
  17. M

    Need help with a trigger for an ability

    Make a periodic timer to change dummy position depending caster position ! You can use arrays to store your dummies units Btw Unit - Create 1 Dummy for (Owner of (Triggering unit)) at Point2 facing (Position of (Triggering unit)) Unit - Move (Last created unit) instantly to Point2, facing...
  18. M

    System Precise Damage Counter

    Oh lol I dont unterstand the code :P! Anyways, I didnt see something like this, it could work idk, just an idea... Store players that have been damaged a unit (UNIT) ... so if UNIT regenerates X (when (hp+dealt)>dc.prev.prevhp) then substract X/(Number of players that damaged that unit) to the...
  19. M

    Detecting if Real is an Integer

    if RqI(6.0) then call BJDebugMsg("true!") else call BJDebugMsg("false!") endif Obiusly it shows false cuz the result is 0 == 0.0 Other thing, Logicaly, A - R2I(A) == 0.0 is the same as A == R2I(A)
Top