- Joined
- Sep 30, 2012
- Messages
- 205
So yeah, i got some new buff spells, but however i still use all of the old ones. So now i want to create a system, so that PC players cast the dummy spells, whenever they 'attack', then checking if a valid target is in range and if it hasn't got the buff already (in this example its called bloodlust, later it won't).
So i hope its clear that i can't just base it on bloodlust, since other buffs will be applied..
The problem i'm now facing is that whenever the potential caster attacks and finds a valid target, he just freezes and waits till all potential targets drop dead or his health drop and the ai pulls the unit back...
Well occasionally he does cast the spell and all looks good, but he will certainly freeze at one point.
Any ideas why this might be the case?
Is there already a working system on the hive? I did some research and all i could find was, base your buffs on buffs that wc3 already uses, and then the original autocast will work fine, well that won't do it for me..
PS: The dummy spell is "channel" with the base/order id of holy light, and then another system spawns a dummy caster to cast "bloodlust"
- no problems there
So i hope its clear that i can't just base it on bloodlust, since other buffs will be applied..
The problem i'm now facing is that whenever the potential caster attacks and finds a valid target, he just freezes and waits till all potential targets drop dead or his health drop and the ai pulls the unit back...
Well occasionally he does cast the spell and all looks good, but he will certainly freeze at one point.
Any ideas why this might be the case?
Is there already a working system on the hive? I did some research and all i could find was, base your buffs on buffs that wc3 already uses, and then the original autocast will work fine, well that won't do it for me..
PS: The dummy spell is "channel" with the base/order id of holy light, and then another system spawns a dummy caster to cast "bloodlust"
- no problems there
-
AIA Copy
-
Events
- Unit - A unit Is attacked
- Conditions
-
Actions
- Set TempUnit = (Attacking unit)
- Set tempPlayer = (Owner of TempUnit)
- Set DBoolean = False
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (tempPlayer controller) Equal to Computer
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of TempUnit) Equal to Footman
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Mana of TempUnit) Greater than or equal to 140.00
-
Then - Actions
- Set TempPoint = (Position of TempUnit)
- Set TempUnitGroup = (Units within 800.00 of TempPoint)
-
Unit Group - Pick every unit in TempUnitGroup and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Picked unit) has buff Bloodlust) Equal to False
- ((Picked unit) is alive) Equal to True
- ((Picked unit) is A structure) Equal to False
- ((Picked unit) is Mechanical) Equal to False
- ((Picked unit) is Magic Immune) Equal to False
- ((Picked unit) is A sapper) Equal to False
- ((Picked unit) is hidden) Equal to False
- (Percentage life of (Picked unit)) Less than 100.00
-
Or - Any (Conditions) are true
-
Conditions
- ((Picked unit) belongs to an ally of tempPlayer) Equal to True
- (Owner of (Picked unit)) Equal to tempPlayer
-
Conditions
-
Then - Actions
- Unit Group - Add (Picked unit) to TempUnitGroup2
- Set DBoolean = True
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- DBoolean Equal to True
-
Then - Actions
- Set TempUnit2 = (Random unit from TempUnitGroup2)
- Unit - Order TempUnit to Human Paladin - Holy Light TempUnit2
- Else - Actions
-
If - Conditions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
- Set TempUnit = No unit
- Set TempUnit2 = No unit
- Unit Group - Remove all units from TempUnitGroup
- Unit Group - Remove all units from TempUnitGroup2
- Unit Group - Remove all units from TempUnitGroup3
- Custom script: set udg_tempPlayer = null
- Custom script: call DestroyGroup(udg_TempUnitGroup)
- Custom script: call DestroyGroup(udg_TempUnitGroup2)
- Custom script: call DestroyGroup(udg_TempUnitGroup3)
- Custom script: call RemoveLocation( udg_TempPoint )
-
Events