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...
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.
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...
: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...
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).
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...
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...
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
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...
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...
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...
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)