- Joined
- Aug 31, 2009
- Messages
- 776
Hey all, I'm making a projectile system for myself for a little Deathmatch/Arena type game, and I seem to have cracked the system pretty well and got it all working great.
The only real problem I have is that I cannot get an ability to work called "Reflective Shield". What this ability does, is apply a buff to your unit and all enemy incoming projectiles are bounced back and change owner (so they can hurt the original caster).
The problem is, the trigger simply refuses to pick the projectiles. The spell works absolutely perfectly when the projectiles do NOT have Locust... but this is totally not an option for obvious reasons.
So my question is... why can't I pick units in range matching condition if they're Locust Units?
Trigger in question:
Here's an example of a projectile creation trigger:
The move/impact triggers work absolutely fine for the Projectiles, so I won't post that here.
However, it is this trigger that is not working for some reason.
This second trigger works perfectly fine however when the Locust ability ('Aloc') is NOT added to the units.
The only real problem I have is that I cannot get an ability to work called "Reflective Shield". What this ability does, is apply a buff to your unit and all enemy incoming projectiles are bounced back and change owner (so they can hurt the original caster).
The problem is, the trigger simply refuses to pick the projectiles. The spell works absolutely perfectly when the projectiles do NOT have Locust... but this is totally not an option for obvious reasons.
So my question is... why can't I pick units in range matching condition if they're Locust Units?
Trigger in question:
Here's an example of a projectile creation trigger:
-
Frostbolt
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Frostbolt
-
-
Actions
-
Set temploc = (Position of (Triggering unit))
-
Set temploc2 = (Target point of ability being cast)
-
Set tempreal = (Angle from temploc to temploc2)
-
Unit - Create 1 Dummy for (Owner of (Triggering unit)) at temploc facing tempreal degrees
-
Custom script: call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
-
Special Effect - Create a special effect attached to the origin of (Last created unit) using Abilities\Weapons\FrostWyrmMissile\FrostWyrmMissile.mdl
-
Hashtable - Save tempreal as 0 of (Key (Last created unit)) in HTable
-
Hashtable - Save 700.00 as 1 of (Key (Last created unit)) in HTable
-
Hashtable - Save 1400.00 as 2 of (Key (Last created unit)) in HTable
-
Hashtable - Save (50.00 x (Real((Level of (Ability being cast) for (Triggering unit))))) as 3 of (Key (Last created unit)) in HTable
-
Hashtable - Save Abilities\Spells\Undead\FrostNova\FrostNovaTarget.mdl as 4 of (Key (Last created unit)) in HTable
-
Hashtable - Save Handle Of(Last created special effect) as 5 of (Key (Last created unit)) in HTable
-
Hashtable - Save 0 as 6 of (Key (Last created unit)) in HTable
-
Hashtable - Save Handle Of(Triggering unit) as 7 of (Key (Last created unit)) in HTable
-
Hashtable - Save 0.00 as 8 of (Key (Last created unit)) in HTable
-
Unit Group - Add (Last created unit) to Projectiles
-
Custom script: call RemoveLocation(udg_temploc)
-
Custom script: call RemoveLocation(udg_temploc2)
-
-
The move/impact triggers work absolutely fine for the Projectiles, so I won't post that here.
However, it is this trigger that is not working for some reason.
-
Reflective Shield
-
Events
-
Time - Every 0.04 seconds of game time
-
-
Conditions
-
Actions
-
Set tempunitgroup = (Units in (Playable map area) matching (((Matching unit) has buff Reflective Shield ) Equal to True))
-
Unit Group - Pick every unit in tempunitgroup and do (Actions)
-
Loop - Actions
-
Set tempunit = (Picked unit)
-
Set temploc = (Position of tempunit)
-
Set tempunitgroup2 = (Units within 150.00 of temploc matching ((((Matching unit) is in Projectiles) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of tempunit)) Equal to True)))
-
Unit Group - Pick every unit in tempunitgroup2 and do (Actions)
-
Loop - Actions
-
Set temploc2 = (Position of (Picked unit))
-
Special Effect - Create a special effect at temploc2 using Abilities\Spells\NightElf\ManaBurn\ManaBurnTarget.mdl
-
Special Effect - Destroy (Last created special effect)
-
Set tempreal = ((Angle from temploc to temploc2) + 180.00)
-
Hashtable - Save 0.00 as 8 of (Key (Picked unit)) in HTable
-
Hashtable - Save tempreal as 0 of (Key (Picked unit)) in HTable
-
Hashtable - Save Handle Oftempunit as 7 of (Key (Picked unit)) in HTable
-
Unit - Change ownership of (Picked unit) to (Owner of tempunit) and Change color
-
Custom script: call RemoveLocation(udg_temploc2)
-
-
-
Custom script: call RemoveLocation(udg_temploc)
-
Custom script: call DestroyGroup(udg_tempunitgroup2)
-
-
-
Custom script: call DestroyGroup(udg_tempunitgroup)
-
-
This second trigger works perfectly fine however when the Locust ability ('Aloc') is NOT added to the units.
Last edited: