System [ZTS] - Zwiebelchens Threat System

SineCosine

I'm still looking for my Tangent
Reaction score
77
@Zwielbelchen

Damn, that's a mighty fine system you have there..
But..

The AI only seems to cast the spells once before they stop casting at all =/
As in..

Okay, this is how it goes..

Spell's cooldown = 15seconds
So..

01) I let the Enemy (Controlled by your awesomely made AI) attack me.
02) One of the units casts a spell on me
03) Cooldown starts..
04) I continue attacking, never running..
05) 15 seconds are up, no spell is cast again..
06) 60 seconds are up, no spell is cast..
07) I use 'windwalk' and become invisible
08) I re-appear
09) Enemy casts spell on me again.

So..
It seems that using

JASS:
if not ZTS_IsEvent() then
        return
endif


Isn't 100% =/
Is there a way around it?

[EDIT]
Also, I tried this..

01) call ZTS_RemovePlayerUnit(unit pu)
02) Wait 20 seconds (Using T32 and 641 ticks)
03) call ZTS_AddPlayerUnit(unit pu)

However, the enemy would only 'run away' for 0.5 seconds before coming back to attack me, even though I did not provoke them ._.

Then, I tried this..
01) call ZTS_RemovePlayerUnit(unit pu)
02) For 20 seconds, every tick, call ZTS_RemovePlayerUnit(unit pu)
03) And then, I don't Add the PlayerUnit back into the system.

Same result: The enemy would only 'run away' for 0.5 seconds before coming back to attack me, even though I did not provoke them

[EDIT2]
I, then, tried this:

JASS:
                    call ZTS_RemovePlayerUnit(Unit)
                    if ZTS_GetCombatState(Unit) == true then
                        call BJDebugMsg("Attacking!?")
                    elseif ZTS_GetCombatState(Unit) == false then
                        call BJDebugMsg("Not attacking")
                    endif


Every T32 tick (0.03125seconds), It would display "Not attacking"..
So..
I don't know what to make of it =x

This, too..
JASS:
call ZTS_RemovePlayerUnit(Unit)
call BJDebugMsg(I2S(ZTS_GetThreatUnitPosition(u, Unit)))


And it displays, 0..

So, It seems that the Unit really IS out of the system..
But it just gets attacked, anyhow =/

[EDIT3]
Yes, I am very interested in your system =)
Also, I found something out..

When I remove a player unit from ZTS..
The creeps attacking it WILL run away and not attack the unit..
But the moment they REACH their 'camp-site' and I am within range of their attack..
They will attack me again, even though I am not in the system at all.

It is as though I removed the creep units from the AI when I did not =/
 

Zwiebelchen

You can change this now in User CP.
Reaction score
60
Spell's cooldown = 15seconds
So..

01) I let the Enemy (Controlled by your awesomely made AI) attack me.
02) One of the units casts a spell on me
03) Cooldown starts..
04) I continue attacking, never running..
05) 15 seconds are up, no spell is cast again..
06) 60 seconds are up, no spell is cast..
07) I use 'windwalk' and become invisible
08) I re-appear
09) Enemy casts spell on me again.
There has to be a mistake with your spell trigger. Remember that ZTS_IsEvent() returns true only once per event! Store the IsEvent boolean to some global boolean if you want to use it multiple times.

01) call ZTS_RemovePlayerUnit(unit pu)
02) Wait 20 seconds (Using T32 and 641 ticks)
03) call ZTS_AddPlayerUnit(unit pu)

However, the enemy would only 'run away' for 0.5 seconds before coming back to attack me, even though I did not provoke them ._.
This is intended. Removing the player unit is like resetting the aggro. The system will simply ignore units that are not registered to the system. If you want to mix up registered with non-registered units, then unfortunately this system is not the right choice.
ZTS_RemovePlayerUnit is just for spells like windwalk, where you want a thread reset for the casting unit.

Then, I tried this..
01) call ZTS_RemovePlayerUnit(unit pu)
02) For 20 seconds, every tick, call ZTS_RemovePlayerUnit(unit pu)
03) And then, I don't Add the PlayerUnit back into the system.

Same result: The enemy would only 'run away' for 0.5 seconds before coming back to attack me, even though I did not provoke them
Sure he does. Even when calling Remove again and again, the unit will stay unregistered, causing the registered mobs to ignore it. When the registered mob is back to its camping position and an unregistered player unit enters the range, the ordinary WC3 AI will take over.
When I remove a player unit from ZTS..
The creeps attacking it WILL run away and not attack the unit..
But the moment they REACH their 'camp-site' and I am within range of their attack..
They will attack me again, even though I am not in the system at all.

It is as though I removed the creep units from the AI when I did not =/
As I said: Unregistering a player unit that is the last remaining unit in the threat list of that mob causes the unit to go back to its camping position and then causes the ordinary WC3 AI to take over, auto engaging it.


To sum it up, this is what happens when you unregister a player unit in-combat:

1) Registered player enters registered mob range
2) Mob attacks, applying 0 threat from unregistered player to the mob, rendering it incombat
3) Player unit gets unregistered
4) Mob recognizes this as aggro reset, as no other unit is currently in its threat list
5) Mob returns to camping position, as there is nothing to fight against anymore (the system will ignore unregistered units, remember that!)
6) The Mob gains full health and mana and resets properly, leaves combat state
7) The WC3 standard AI takes over, causing the unregistered unit to be attacked, if it is in attack range
8) Unless the player unit is being registered again, there will be no thread listed for that player on the attacking mob. Also, the camp squad functionality won't kick in. All in all, in that case the unit will behave like an ordinary WC3 unit.


Remember this rule of thumb: If the player unit is not attackable right now (like in windwalk state), unregister it. As soon as it shows up again, register it again, etc.
 

Lmfaocj

Active Member
Reaction score
1
I am pretty noob at this stuff I was just wondering if I wanted to make a threat multi board how would I do it? because leader boards are abit to limited for me.
 

Lmfaocj

Active Member
Reaction score
1
I was wondering if I could make the unit return to his camping spot by using triggers
 

Zwiebelchen

You can change this now in User CP.
Reaction score
60
I was wondering if I could make the unit return to his camping spot by using triggers
Nope, this is not possible. But you could manually remove all player units that are infight with that unit for an instant and add them again. In that case the aggro is wiped for that mob and it will return to its camping position.
Sorry that I didn't add a special command for that. Couldn't imagine that someone would ever want to do that.

I am pretty noob at this stuff I was just wondering if I wanted to make a threat multi board how would I do it? because leader boards are abit to limited for me.
Simply use the Getter functions provided by the system to get threat position, threat amount, etc. ...
Sorry, but I can't help you further with that. But maybe you can check out the demo map. It demonstrates some of the commands you can use to build up your multiboard.


I uploaded a new version 2.5, fixing some bugs and adding some new stuff to the system. Please upgrade to 2.5!
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top