- Joined
- Jun 2, 2009
- Messages
- 1,233
Here is the system that i need
When enemy heroes cast spells on you or attacks you, your friendly units around you starts to attack the enemy who attacks or cast spells on you for few seconds. After few seconds they will order to attack and move to their next targets (next target, current target and previous target already set)
Explanation with the video:
Update: Here is the system that i have created but it has huge flaw.
Old system was in Jass and i don't have any idea what is happening in there. Here is the link Is there a way to convert this into GUI? Because it has problems and i cannot read Jass.
Question 1: How can i order them to their CurrentTargets when the aggro ends? I don't know because code is Jass. This is why i am trying to create it as GUI
Question 2: Is this Jass code only for the Aggro? I am asking because i will remove this Jass code from my map and i will use my GUI system. Is this Jass affects any other things in my map?
Question 3: Is If we do not need to convert this Jass into GUI, how can i send them to their CurrentTargets?
I want to order them to DevilNextHedef (for picked player 1 unit) and ReaperNextHedef (for picked player 7 unit) but i don't know how to combine these.
When enemy heroes cast spells on you or attacks you, your friendly units around you starts to attack the enemy who attacks or cast spells on you for few seconds. After few seconds they will order to attack and move to their next targets (next target, current target and previous target already set)
Explanation with the video:
Update: Here is the system that i have created but it has huge flaw.
-
AggroTest1
-
Events
-
Game - DamageEvent becomes Equal to 1.00
-
-
Conditions
-
(DamageEventTarget is A Hero) Equal to True
-
(DamageEventSource is A Hero) Equal to True
-
-
Actions
-
Set DamagePoint = (Position of DamageEventTarget)
-
Set DamageGroup = (Units within 1000.00 of DamagePoint)
-
Unit Group - Pick every unit in DamageGroup and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Picked unit) is in CreepsGroup) Equal to True
-
((Picked unit) belongs to an enemy of (Owner of DamageEventSource)) Equal to True
-
-
Then - Actions
-
Unit - Order (Picked unit) to Attack DamageEventSource
-
Game - Display to (All players) for 1.00 seconds the text: (Name of (Picked unit))
-
Trigger - Run AggroEnds <gen> (ignoring conditions)
-
-
Else - Actions
-
-
-
-
Custom script: call RemoveLocation(udg_DamagePoint)
-
-
-
AggroEnds
-
Events
-
Conditions
-
Actions
-
Wait 2.00 seconds
-
Unit Group - Pick every unit in DamageGroup and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Picked unit) is in CreepsGroup) Equal to True
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Owner of (Picked unit)) Equal to Player 1 (Red)
-
-
Then - Actions
-
Unit - Order (Picked unit) to Attack-Move To (Center of Region 000 <gen>)
-
Game - Display to (All players) for 1.00 seconds the text: Red aggro ends
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Owner of (Picked unit)) Equal to Player 7 (Green)
-
-
Then - Actions
-
Unit - Order (Picked unit) to Attack-Move To (Center of Region 001 <gen>)
-
Game - Display to (All players) for 1.00 seconds the text: Green aggro ends
-
-
Else - Actions
-
-
-
-
-
Else - Actions
-
-
-
-
Custom script: call DestroyGroup(udg_DamageGroup)
-
-
Old system was in Jass and i don't have any idea what is happening in there. Here is the link Is there a way to convert this into GUI? Because it has problems and i cannot read Jass.
Question 1: How can i order them to their CurrentTargets when the aggro ends? I don't know because code is Jass. This is why i am trying to create it as GUI
Question 2: Is this Jass code only for the Aggro? I am asking because i will remove this Jass code from my map and i will use my GUI system. Is this Jass affects any other things in my map?
Question 3: Is If we do not need to convert this Jass into GUI, how can i send them to their CurrentTargets?
-
Creep Yollari
-
Events
-
Map initialization
-
-
Conditions
-
Actions
-
-------- S P A W N P O I N T S --------
-
Set DevilSpawnNoktasi[1] = (Center of DevilSpawn1 <gen>)
-
Set DevilSpawnNoktasi[2] = (Center of DevilSpawn2 <gen>)
-
Set DevilSpawnNoktasi[3] = (Center of DevilSpawn3 <gen>)
-
Set ReaperSpawnNoktasi[1] = (Center of ReaperSpawn1 <gen>)
-
Set ReaperSpawnNoktasi[2] = (Center of ReaperSpawn2 <gen>)
-
Set ReaperSpawnNoktasi[3] = (Center of ReaperSpawn3 <gen>)
-
-------- ___________________________ --------
-
Set CreepHedeflerRegion[1] = DevilSpawn1 <gen>
-
Set CreepHedeflerRegion[2] = DevilSol <gen>
-
Set CreepHedeflerRegion[3] = AltMid <gen>
-
Set CreepHedeflerRegion[4] = Reapersol <gen>
-
Set CreepHedeflerRegion[5] = ReaperSpawn1 <gen>
-
Set CreepHedeflerRegion[6] = DevilSpawn2 <gen>
-
Set CreepHedeflerRegion[7] = ReaperSpawn2 <gen>
-
Set CreepHedeflerRegion[8] = DevilSpawn3 <gen>
-
Set CreepHedeflerRegion[9] = DevilSag <gen>
-
Set CreepHedeflerRegion[10] = UstMid <gen>
-
Set CreepHedeflerRegion[11] = ReaperSag <gen>
-
Set CreepHedeflerRegion[12] = ReaperSpawn3 <gen>
-
Set CreepHedefSayisi = 12
-
For each (Integer A) from 1 to CreepHedefSayisi, do (Actions)
-
Loop - Actions
-
Set CreepHedefler[(Integer A)] = (Center of CreepHedeflerRegion[(Integer A)])
-
Trigger - Add to Creep Yonlendirme <gen> the event (Unit - A unit enters CreepHedeflerRegion[(Integer A)])
-
-
-
Set DevilNextHedef[1] = (Center of DevilSol <gen>)
-
Set DevilNextHedef[2] = (Center of AltMid <gen>)
-
Set DevilNextHedef[3] = (Center of Reapersol <gen>)
-
Set DevilNextHedef[4] = (Center of ReaperSpawn1 <gen>)
-
Set DevilNextHedef[5] = (Center of ValueReaper <gen>)
-
Set DevilNextHedef[6] = (Center of ReaperSpawn2 <gen>)
-
Set DevilNextHedef[7] = (Center of ValueReaper <gen>)
-
Set DevilNextHedef[8] = (Center of DevilSag <gen>)
-
Set DevilNextHedef[9] = (Center of UstMid <gen>)
-
Set DevilNextHedef[10] = (Center of ReaperSag <gen>)
-
Set DevilNextHedef[11] = (Center of ReaperSpawn3 <gen>)
-
Set DevilNextHedef[12] = (Center of ValueReaper <gen>)
-
Set ReaperNextHedef[1] = (Center of DevilSlayer <gen>)
-
Set ReaperNextHedef[2] = (Center of DevilSpawn1 <gen>)
-
Set ReaperNextHedef[3] = (Center of DevilSol <gen>)
-
Set ReaperNextHedef[4] = (Center of AltMid <gen>)
-
Set ReaperNextHedef[5] = (Center of Reapersol <gen>)
-
Set ReaperNextHedef[6] = (Center of DevilSlayer <gen>)
-
Set ReaperNextHedef[7] = (Center of DevilSpawn2 <gen>)
-
Set ReaperNextHedef[8] = (Center of DevilSlayer <gen>)
-
Set ReaperNextHedef[9] = (Center of DevilSpawn3 <gen>)
-
Set ReaperNextHedef[10] = (Center of DevilSag <gen>)
-
Set ReaperNextHedef[11] = (Center of UstMid <gen>)
-
Set ReaperNextHedef[12] = (Center of ReaperSag <gen>)
-
-------- ___________________________ --------
-
Set DevilSpawnHedef[1] = (Center of DevilSol <gen>)
-
Set DevilSpawnHedef[2] = (Center of ReaperSpawn2 <gen>)
-
Set DevilSpawnHedef[3] = (Center of DevilSag <gen>)
-
Set ReaperSpawnHedef[1] = (Center of Reapersol <gen>)
-
Set ReaperSpawnHedef[2] = (Center of DevilSpawn2 <gen>)
-
Set ReaperSpawnHedef[3] = (Center of ReaperSag <gen>)
-
Set DevilSpawnCreepAbilityLevel[1] = 1
-
Set DevilSpawnCreepAbilityLevel[2] = 6
-
Set DevilSpawnCreepAbilityLevel[3] = 8
-
Set ReaperSpawnCreepAbilityLevel[1] = 5
-
Set ReaperSpawnCreepAbilityLevel[2] = 7
-
Set ReaperSpawnCreepAbilityLevel[3] = 12
-
-
-
Creep Yonlendirme
-
Events
-
Conditions
-
((Owner of (Triggering unit)) Equal to ClanDevilPlayer) or ((Owner of (Triggering unit)) Equal to ClanReaperPlayer)
-
-
Actions
-
Wait 0.01 seconds
-
For each (Integer A) from 1 to CreepHedefSayisi, do (Actions)
-
Loop - Actions
-
Custom script: if IsLocationInRegion(GetTriggeringRegion(), udg_CreepHedefler[bj_forLoopAIndex]) then
-
-------- Integer A girilen region --------
-
Unit - Set level of BEN CREEBIM for (Triggering unit) to (Integer A)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Owner of (Triggering unit)) Equal to ClanDevilPlayer
-
-
Then - Actions
-
Unit - Order (Triggering unit) to Attack-Move To DevilNextHedef[(Integer A)]
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Owner of (Triggering unit)) Equal to ClanReaperPlayer
-
-
Then - Actions
-
Unit - Order (Triggering unit) to Attack-Move To ReaperNextHedef[(Integer A)]
-
-
Else - Actions
-
-
-
-
Custom script: endif
-
-
-
-
I want to order them to DevilNextHedef (for picked player 1 unit) and ReaperNextHedef (for picked player 7 unit) but i don't know how to combine these.
Last edited: