Yeah, actually, this is quite easy to do.I can't recall this right now or test it at the moment but I'm pretty sure you can create a texttag for a single player using GetLocalPlayer. This would be a great way to denote how a player has threat. You could adopt the style WoW uses, yellow means you're close to pulling agro and red means you have agro.
Thoughts?
- Second, it features a unique camp squad functionality, which ensures that units that are preplaced in camps will always attack and return together. If units return, they will be rendered invulnerable until they reach their original camp position again. If they can not reach their camping position within a certain duration, they will get instantly teleported back.
Like this, there is almost no more kiting or bug-abusing possible, as it was with other systems.
Well, it checks for HelpRange only. You could always add a race check to the Filter function to acchieve that.[Return together]
how does your system know which units belong to which camp group? if i place goblins and spiders close to each other in a wood but i dont want goblins and spiders to attack and return together because...well that would be awkward, would it be possible?
You can always check for the combat state of the wandering unit, and if it is false, periodically RemoveThreatUnit, followed by AddThreatUnit.would it be possible as well to have wandering creeps around with this system?
Well, actually, this is how it should be. If you want a fair game with no kiting possible, it has to be like that.[Rendered Invulnerable]
i dont like the idea of invulnerable creeps running around my map. lets imagine the case player one attacks the creeps and lures them out of their camp, he gets killed and the creeps returned rendered invulnerable.
Player 2 wouldnt be able to attack the creeps not until they reached their camp? this seems quite weird and annoying to me, sorry but i dislike it though i see the idea behind it.
This is why there is a counter for the teleporting issue. It's just to prevent players from blocking the way to the camp position or abusing root abilitys and stuns to split the groups.[Teleported back]
teleported back?! lol thats pretty awkward, sorry. i understand what you wanna do with it but i just cant take the fact that my creeps will teleport around the world after a battle. i think it would be pretty annoying to rogues or ninja characters who are trying to trap them if they just teleport back.
This was due to a bug. It should be fixed with 2.1.[bug-abusing]
hm i dunno any other system so i dont know what bugs you are talking about but testing your map i saw some bugs myself. i fought a melee enemy which targeted a footman. i used ensnare with the bowmans and casted holy light with the arch mage. the enemy was now just spinning around not doing anything anymore because it tried to attack the arch mage at any cost.
Unfortunately, there is no way to prevent that, as there is no way to find out wether the unit can actually reach the target or not.i havent tried but i guess same would happen if i had alot of units standing around my arch mage and blocking that creep off.
I guess we have a different definition of kiting. The system does not prevent "fire and run" in any way, it just orders the camp units to retreat always together, to prevent players from splitting the group by using snares, stunes, etc.and about kiting, well i think that might not be considered a "cheat" or "abuse" but rather a tactic of weaker fighters such as rogues or mages which will get killed by all those dmg dealing creeps if they come at once.
public function GetThreatUnitAmount takes unit npc, unit pu returns real
if GetUnitTypeId(npc) == 0 or IsUnitType(npc, UNIT_TYPE_DEAD) or GetUnitTypeId(pu) == 0 or IsUnitType(pu, UNIT_TYPE_DEAD) then //units dead or null
return 0.
elseif not HaveSavedInteger(NPClist, GetHandleId(npc), 0) and HaveSavedHandle(PUlist, GetHandleId(pu), 0) then //units not added
return 0.
elseif HaveSavedInteger(PUlist, GetHandleId(pu), GetHandleId(npc)) then
return LoadReal(NPClist, GetHandleId(npc), Pos2Key(LoadInteger(PUlist, GetHandleId(pu), GetHandleId(npc))))
endif
return 0.
endfunction
/* This return the correct value: */
BJDebugMsg(R2S(ZTS_GetThreatSlotAmount(target,ZTS_GetThreatUnitPosition(target,attacker))));
/* This returns the incorrect value: */
BJDebugMsg(R2S(ZTS_GetThreatUnitAmount(target,attacker)));
elseif not (HaveSavedInteger(NPClist, GetHandleId(npc), 0) and HaveSavedHandle(PUlist, GetHandleId(pu), 0)) then //units not added
return 0.