- Joined
- Sep 6, 2013
- Messages
- 6,743
You should explain what "Distributor" actually is, as there's currently no description.
(0 ratings)
Distributor means a two type which distribute each state, the life and the mana, the main ability is will summon a spirit ball either life or mana, the ball will move infinite style to target position, target could be anyone, caster can cast it to his self and can so to enemy, the ball will move infinite style to target position, when the ball hits an enemy it will distribute state, if the ball is for life the ball will damage them and keep it as a life while the mana will steal mana to hitted enemy until they hit an ally so they will give the state they keep.
After infinite move, the ball will stop and stay until they die, at the moment they stay, the other ability could use them.
The slam,the slingshot, the dragon and the reunion
Can manipulate them
Very sorry if the gif's are not high quality i was saving my data because i only used hacked internet data
Also my spell still uses dummy, im sorry for im a legendary pirated user ever since, i cant afford to update my warcraft version, i dont have any budget, im poor programmer XD
-Owner of SpellEffectEvent
-Owner of PlayerUnitEvent
-Vexorian for his dummy
v1.0a
-Reduced Memory Usage
First of all copy the imported dummy
Second copy all objects
Finally copy requirements folder and distributor folder
Im very sorry i forgot, anyway boo i miss you, welcome backYou should explain what "Distributor" actually is, as there's currently no description.
DistanceBetweenXY
can be optimized to return the square of the distance (not bothering with square root). That way, it would be less CPU-intensive to call this function in a loop.DISTRIBUTOR_dummy
Death
GetUnitTypeId(u)==DUMMY_ID
can be replaced with a hashtable HaveSavedHandle(hash, GetHandleId(u), 0)
check instead. This further ensures that only dummy units created for the class/struct will correctly proceed to the next step.SaveEffectHandle(hash, id, 0, null)
before RemoveSavedHandle(hash, id, 0)
.createballs
onCast
This is quite the eye-candy for a spellpack, I must say. However, optimizations and such are still possible. A lot needs to be said, but I can't say them all at once, so I've left it in spoilers.
- The function
DistanceBetweenXY
can be optimized to return the square of the distance (not bothering with square root). That way, it would be less CPU-intensive to call this function in a loop.
- In struct
DISTRIBUTOR_dummy
- In static method
Death
- The if-condition
GetUnitTypeId(u)==DUMMY_ID
can be replaced with a hashtable lookupHaveSavedHandle(hash, GetHandleId(u), 0)[/ljas] check instead. This further ensures that only dummy units created for the class/struct will correctly proceed to the next step. [*]Setting a field value (of a hashtable entry) to null before removing that entry from the hashtable is redundant. [icode=jass]SaveEffectHandle(hash, id, 0, null)
beforeRemoveSavedHandle(hash, id, 0)
.- In struct
createballs
- In static method
onCast
- Having to use the same parent key to store different types would be more difficult to troubleshoot when something goes wrong with the spellpack (internally or externally). In this case, using 0 as a parent key to store both integers (unit types) and handles (groups) will cause some sort of confusion as to whether to treat the entry as an integer or as a handle.
private function DistanceBetweenXY takes real x1,real y1,real x2,real y2 returns real
local real dx=x2-x1
local real dy=y2-y1
return dx*dx+dy*dy
endfunction
/*--------------------------------------------------------------------*/
set r=DistanceBetweenXY(x,y,xd,yd)
if r>((dist*dist)/2.0) then
set deg=bj_RADTODEG*Atan2(y-yd,x-xd)
elseif r<((dist*dist)/2.0) then
set deg=bj_RADTODEG*Atan2(yd-y,xd-x)
endif
GetUnitTypeId(u)==DUMMY_ID and IsUnitInGroup(u,LoadGroupHandle(hash,GetHandleId(LoadUnitHandle(hash,id,1)),0))
OMG im very sorry,, this spell was made at old warcraft version.. no wonder why you encounter bugs because you are using reforged (+_+)lol this is pretty cool, however im having a problem, it is crashing when using the life and mana distributor on enemies, and usually happen after a few uses of the skills initially, and then something doesn't seem quite about the reunion, is anybody else having problems too or is just me? xD
Update; Ive discovered the one problem im having, is when the unit you cast the mana or life distributor on dies before the distributor can finish, it seems to get stuck following you in an attack form i suppose ill call it, and never become usable by another spell, walking through a group of enemies cause the distributors non stop attack anything is passes through lol and they do not time out either, i believe too the same is happening when using reunion when they come back to you, same kind of stuck but following you deal cant quite remember if those ones timed out but i think so.
Update2; fixed my problem, however the reunion skill does not function and also does not in your test map running it in reforged. Any ideas on why and how to fix?
lol yea i kinda figured that way why, things are different lolOMG im very sorry,, this spell was made at old warcraft version.. no wonder why you encounter bugs because you are using reforged (+_+)