• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] AOE Blinding Spell - MUI Spell

Status
Not open for further replies.
Level 4
Joined
Sep 25, 2018
Messages
81
Here is the basic idea of the spell I am trying to create.

Monster casts his ability; Hypnotic Void (Based on Channel)

After successfully channelling for 2 seconds, a huge AOE debuff (which pierces spell immunity) silences every unit in a 1200 radius for 8 seconds.
While silenced, Hero units vision is reduced to 400, and non-hero units vision is reduced to 0 (So you completely lose vision over your non-hero units). This is done using the "Unit - Set Unit: (Picked unit)'s Real Field: Sight Radius ('usir') to Value: 0.00".
After the 8 second duration, all the affected units vision is returned to their original values.

Here is what I have as a very basic test to see if the vision and silence part works.

  • HypnoticVoidCast
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Hypnotic Void
    • Actions
      • Set hvCast = (Casting unit)
      • Set hvGroup = (Units within 1200.00 of (Position of hvCast) matching ((((Matching unit) is Mechanical) Equal to False) and ((((Matching unit) is A structure) Equal to False) and (((Matching unit) belongs to an ally of (Owner of hvCast)) Equal to False))))
      • Unit - Create 1 Dummy (Hypnotic Void) for (Owner of hvCast) at (Position of hvCast) facing (Position of hvCast)
      • Unit - Add Hypnotic Void (Dummy Ability) to (Last created unit)
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Unit - Set level of Hypnotic Void (Dummy Ability) for (Last created unit) to (Level of Hypnotic Void for hvCast)
      • Unit - Order (Last created unit) to Neutral Dark Ranger - Silence (Position of hvCast)
      • Trigger - Turn on HypnoticVoidEffect <gen>
  • HypnoticVoidEffect
    • Events
      • Time - Every 0.20 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in hvGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Silence) Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked unit) is An Ancient) Equal to False
                • Then - Actions
                  • Unit - Set Unit: (Picked unit)'s Real Field: Sight Radius ('usir') to Value: 0.00
                • Else - Actions
                  • Unit - Set Unit: (Picked unit)'s Real Field: Sight Radius ('usir') to Value: 400.00
            • Else - Actions
              • Trigger - Turn off (This trigger)
The problem I have is making the spell MUI and also returning all of the affected units vision back to how is was before being hit by the spell. (Which I suppose is an MUI issue. I guess I would have to save each affected units vision before being hit by the spell.)

Edit: I started making an attempt at converting this into an MUI spell. I just got a little lost with the stating of the variables. I have only ever successfully created a single targeted MUI spell (which didn't involve Dummy units). Was not sure what is the best way to go about making an MUI spell that is AOE.
 
Last edited:
Level 9
Joined
Jul 30, 2018
Messages
445
You'll need store information for each individual unit, so you need unit indexing. You could use hashtables too (personally I like hashtables, because once you get the hang on them, they are simple and clear to use).

On the cast trigger you store the current (default) sight radius to the hashtable for each affected unit and then reduce it and use the dummy to Silence the unit. And then on the period trigger you run through the hashtable group and check the duration of the spell. Once the timer ends (or if you want to rely on the duration of the Silence, once the unit doesn't have the buff anymore) you reset the sight radius back to its default value.

Here is a good tutorial on hashtables, if you're unfamiliar with them.
 
Level 4
Joined
Sep 25, 2018
Messages
81
You'll need store information for each individual unit, so you need unit indexing. You could use hashtables too (personally I like hashtables, because once you get the hang on them, they are simple and clear to use).

On the cast trigger you store the current (default) sight radius to the hashtable for each affected unit and then reduce it and use the dummy to Silence the unit. And then on the period trigger you run through the hashtable group and check the duration of the spell. Once the timer ends (or if you want to rely on the duration of the Silence, once the unit doesn't have the buff anymore) you reset the sight radius back to its default value.

Here is a good tutorial on hashtables, if you're unfamiliar with them.

I think I get the general idea of the use of hashtable. Current issue is following the tutorial, but making trying to make it AoE. (Tutorials examples are all single target, which are significantly easier.)
When storing the current sight radius to the hashtable, would I do the trigger like this?

  • HypnoticVoidCast
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Hypnotic Void
    • Actions
      • Unit Group - Pick every unit in (Units within 1200.00 of (Position of (Casting unit)) matching (((Matching unit) has buff Silence) Equal to True)) and do (Actions)
        • Loop - Actions
          • Set HypnoticVoid_TargetSight = (Unit: (Picked unit)'s Real Field: Sight Radius ('usir'))
The next part will be saving the picked units into the hashtable itself.
 
Level 9
Joined
Jul 30, 2018
Messages
445
It shouldn't be any different for AoE, because you have to treat all units individually anyway. I didn't test it, but this should do it:

  • Cast Blind
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Channel
    • Actions
      • Set TempLoc = (Position of (Triggering unit))
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 600.00 of TempLoc) and do (Actions)
        • Loop - Actions
          • Set TempUnit = (Picked unit)
          • Set TempHandle = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (TempUnit is alive) Equal to True
              • (TempUnit is A structure) Not equal to True
              • (TempUnit belongs to an enemy of (Owner of (Triggering unit))) Equal to True
            • Then - Actions
              • Hashtable - Save 10.00 as (Key duration) of (Key TempHandle) in BlindTable
              • Hashtable - Save (Unit: TempUnit's Real Field: Sight Radius ('usir')) as (Key sightradius) of (Key TempHandle) in BlindTable
              • Unit - Set Unit: TempUnit's Real Field: Sight Radius ('usir') to Value: 0.00
              • -------- Use dummy to cast Silence on TempUnit --------
              • Unit Group - Add TempUnit to BlindGroup
            • Else - Actions
      • Custom script: call RemoveLocation(udg_TempLoc)
  • Blind Periodic
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in BlindGroup and do (Actions)
        • Loop - Actions
          • Set TempUnit = (Picked unit)
          • Set TempHandle = (Picked unit)
          • Set Duration = (Load (Key duration) of (Key TempHandle) from BlindTable)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Duration Greater than 0.00
              • (TempUnit has buff Silence) Equal to True
            • Then - Actions
              • Hashtable - Save (Duration - 0.10) as (Key duration) of (Key TempHandle) in BlindTable
            • Else - Actions
              • Unit - Set Unit: TempUnit's Real Field: Sight Radius ('usir') to Value: (Load (Key sightradius) of (Key TempHandle) from BlindTable)
              • Unit - Remove Silence buff from TempUnit
              • Hashtable - Clear all child hashtables of child (Key TempHandle) in BlindTable
              • Unit Group - Remove TempUnit from BlindGroup
 
Level 4
Joined
Sep 25, 2018
Messages
81
It shouldn't be any different for AoE, because you have to treat all units individually anyway. I didn't test it, but this should do it:

  • Cast Blind
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Channel
    • Actions
      • Set TempLoc = (Position of (Triggering unit))
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 600.00 of TempLoc) and do (Actions)
        • Loop - Actions
          • Set TempUnit = (Picked unit)
          • Set TempHandle = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (TempUnit is alive) Equal to True
              • (TempUnit is A structure) Not equal to True
              • (TempUnit belongs to an enemy of (Owner of (Triggering unit))) Equal to True
            • Then - Actions
              • Hashtable - Save 10.00 as (Key duration) of (Key TempHandle) in BlindTable
              • Hashtable - Save (Unit: TempUnit's Real Field: Sight Radius ('usir')) as (Key sightradius) of (Key TempHandle) in BlindTable
              • Unit - Set Unit: TempUnit's Real Field: Sight Radius ('usir') to Value: 0.00
              • -------- Use dummy to cast Silence on TempUnit --------
              • Unit Group - Add TempUnit to BlindGroup
            • Else - Actions
      • Custom script: call RemoveLocation(udg_TempLoc)
  • Blind Periodic
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in BlindGroup and do (Actions)
        • Loop - Actions
          • Set TempUnit = (Picked unit)
          • Set TempHandle = (Picked unit)
          • Set Duration = (Load (Key duration) of (Key TempHandle) from BlindTable)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Duration Greater than 0.00
              • (TempUnit has buff Silence) Equal to True
            • Then - Actions
              • Hashtable - Save (Duration - 0.10) as (Key duration) of (Key TempHandle) in BlindTable
            • Else - Actions
              • Unit - Set Unit: TempUnit's Real Field: Sight Radius ('usir') to Value: (Load (Key sightradius) of (Key TempHandle) from BlindTable)
              • Unit - Remove Silence buff from TempUnit
              • Hashtable - Clear all child hashtables of child (Key TempHandle) in BlindTable
              • Unit Group - Remove TempUnit from BlindGroup
Bit of a pain, but it seems I cannot use the custom script "RemoveLocation" when using Lua script language. When I try to use "Custom script: call RemoveLocation(udg_HypnoticVoid_CastPoint)", it keeps coming up with "Unknown compile error - syntax error near 'RemoveLocation'. Have you encountered this problem happen or could it be some other issue?

Edit: Obviously, HypnoticVoid_CastPoint is my Point variable.
 
Last edited:
Level 39
Joined
Feb 27, 2007
Messages
5,069
If using Lua you don’t need the “call”. Otherwise it could be an invisible character that exists somewhere in the line you can’t see. To fix that just delete the whole CS line and make a new one from scratch.
 
Level 4
Joined
Sep 25, 2018
Messages
81
If using Lua you don’t need the “call”. Otherwise it could be an invisible character that exists somewhere in the line you can’t see. To fix that just delete the whole CS line and make a new one from scratch.
Yeah, that was the problem, thanks!
 
Level 4
Joined
Sep 25, 2018
Messages
81
Here is the mostly working version I currently have (Thanks @Sabe you were right that once you get start to get hang of them, they are actually quite simple, in theory).

  • TheThirdEyeCast
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to The Third Eye
    • Actions
      • Set TTE_Point = (Position of (Casting unit))
      • Custom script: bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 1200.00 of TTE_Point) and do (Actions)
        • Loop - Actions
          • Set TTE_TempUnit = (Picked unit)
          • Set TTE_TempHandle = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (TTE_TempUnit is alive) Equal to True
              • (TTE_TempUnit belongs to an enemy of (Owner of (Casting unit))) Equal to True
            • Then - Actions
              • Hashtable - Save (6.00 + (2.00 x (Real((Level of The Third Eye for (Casting unit)))))) as (Key TTE_DurationHandle) of (Key TTE_TempHandle) in TTE_HastTable
              • Hashtable - Save (Unit: TTE_TempUnit's Real Field: Sight Radius ('usir')) as (Key TTE_SightradiusHandle) of (Key TTE_TempHandle) in TTE_HastTable
              • Unit - Create 1 Dummy (Hypnotic Void) for (Owner of (Casting unit)) at TTE_Point facing TTE_Point
              • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
              • Unit - Add The Third Eye (Dummy Ability) to (Last created unit)
              • Unit - Set level of The Third Eye (Dummy Ability) for (Last created unit) to (Level of The Third Eye for (Casting unit))
              • Unit - Order (Last created unit) to Neutral Dark Ranger - Silence TTE_Point
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (TTE_TempUnit is A Hero) Equal to True
                • Then - Actions
                  • Unit - Set Unit: TTE_TempUnit's Real Field: Sight Radius ('usir') to Value: 400.00
                  • Unit Group - Add TTE_TempUnit to TTE_Group
                • Else - Actions
                  • Unit - Set Unit: TTE_TempUnit's Real Field: Sight Radius ('usir') to Value: 0.00
                  • Unit Group - Add TTE_TempUnit to TTE_Group
            • Else - Actions
              • Unit - Create 1 Dummy (Hypnotic Void) for (Owner of (Casting unit)) at TTE_Point facing TTE_Point
              • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
              • Unit - Add The Third Eye (Dummy Ability) to (Last created unit)
              • Unit - Set level of The Third Eye (Dummy Ability) for (Last created unit) to (Level of The Third Eye for (Casting unit))
              • Unit - Order (Last created unit) to Neutral Dark Ranger - Silence TTE_Point
      • Custom script: RemoveLocation(udg_HypnoticVoid_CastPoint)
  • TheThirdEyeEffect
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in TTE_Group and do (Actions)
        • Loop - Actions
          • Set TTE_TempUnit = (Picked unit)
          • Set TTE_TempHandle = (Picked unit)
          • Set TTE_Duration = (Load (Key TTE_DurationHandle) of (Key TTE_TempHandle) from TTE_HastTable)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • TTE_Duration Greater than 0.00
              • (TTE_TempUnit has buff The Third Eye ) Equal to True
            • Then - Actions
              • Hashtable - Save (TTE_Duration - 0.10) as (Key TTE_DurationHandle) of (Key TTE_TempHandle) in TTE_HastTable
            • Else - Actions
              • Unit - Set Unit: TTE_TempUnit's Real Field: Sight Radius ('usir') to Value: (Load (Key TTE_SightradiusHandle) of (Key TTE_TempHandle) from TTE_HastTable)
              • Unit - Remove Silence buff from TTE_TempUnit
              • Hashtable - Clear all child hashtables of child (Key TTE_TempHandle) in TTE_HastTable
              • Unit Group - Remove TTE_TempUnit from TTE_Group
Thing I am trying to work out is how to make it so that if my spell is cast with only allies/own units nearby, it will still cast the dummy ability. (It currently doesn't). If I change the triggers slightly so that it casts my dummy ability when allies/own units are nearby, it seems to permanently reduce the units vision, (except the caster's vision) even though they are unaffected by the debuff, hmmm).
 
Last edited:
Level 4
Joined
Sep 25, 2018
Messages
81
Sorry, but I don't quite get what you're saying. Isn't it supposed to only work on enemies..?
So, normally, if you cast the ability, with no enemies nearby, after the channel is finished, it won’t spawn the dummy to cast the dummy spell. So there’s no effect from the dummy spell.

I changed the trigger slightly so that it will spawn the dummy, however, all allies (except allied heroes) have their vision reduced to 400 permanently.

Also, another problem which I’m trying to sort out is the automatic sight change between day and night. If the spell is cast at night, just before it becomes day, when day arrives, it will cancel the vision reduction, and force all affected units to have their day vision. I believe this can easily be fixed by having the vision reduction part moved to the Effect part of the trigger (rather than the cast part). I’ll have to do some more tests when I get back home.
 
Level 9
Joined
Jul 30, 2018
Messages
445
I changed the trigger slightly so that it will spawn the dummy, however, all allies (except allied heroes) have their vision reduced to 400 permanently.

Can you post the modified trigger?

If the spell is cast at night, just before it becomes day, when day arrives, it will cancel the vision reduction, and force all affected units to have their day vision.

Oh yeah, I didn't even think about that. Hmm.. It could get a bit tricky. Unless you give all units a fixed change in the vision between day and night (for example, all units have 50% vision at night) you could then just check if it's night or day when you store the original sight radius. Then check again the time of day when you return the sight radius.
 
Level 4
Joined
Sep 25, 2018
Messages
81
Can you post the modified trigger?



Oh yeah, I didn't even think about that. Hmm.. It could get a bit tricky. Unless you give all units a fixed change in the vision between day and night (for example, all units have 50% vision at night) you could then just check if it's night or day when you store the original sight radius. Then check again the time of day when you return the sight radius.
  • TheThirdEyeCast
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to The Third Eye
    • Actions
      • Set TTE_Point = (Position of (Casting unit))
      • Custom script: bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 1200.00 of TTE_Point) and do (Actions)
        • Loop - Actions
          • Set TTE_TempUnit = (Picked unit)
          • Set TTE_TempHandle = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (TTE_TempUnit is alive) Equal to True
              • (TTE_TempUnit belongs to an enemy of (Owner of (Casting unit))) Equal to True
            • Then - Actions
              • Hashtable - Save (6.00 + (2.00 x (Real((Level of The Third Eye for (Casting unit)))))) as (Key TTE_DurationHandle) of (Key TTE_TempHandle) in TTE_HastTable
              • Hashtable - Save (Unit: TTE_TempUnit's Real Field: Sight Radius ('usir')) as (Key TTE_SightradiusHandle) of (Key TTE_TempHandle) in TTE_HastTable
              • Unit - Create 1 Dummy (Hypnotic Void) for (Owner of (Casting unit)) at TTE_Point facing TTE_Point
              • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
              • Unit - Add The Third Eye (Dummy Ability) to (Last created unit)
              • Unit - Set level of The Third Eye (Dummy Ability) for (Last created unit) to (Level of The Third Eye for (Casting unit))
              • Unit - Order (Last created unit) to Neutral Dark Ranger - Silence TTE_Point
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (TTE_TempUnit is A Hero) Equal to True
                • Then - Actions
                  • Unit - Set Unit: TTE_TempUnit's Real Field: Sight Radius ('usir') to Value: 400.00
                  • Unit Group - Add TTE_TempUnit to TTE_Group
                • Else - Actions
                  • Unit - Set Unit: TTE_TempUnit's Real Field: Sight Radius ('usir') to Value: 0.00
                  • Unit Group - Add TTE_TempUnit to TTE_Group
            • Else - Actions
      • Custom script: RemoveLocation(udg_HypnoticVoid_CastPoint)
This was the original, script which works fine (no strange effects to allied/caster owned units), except that it does not cast the dummy spell if there are no enemies within 1200 of the channelled cast point.

  • TheThirdEyeCast
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to The Third Eye
    • Actions
      • Set TTE_Point = (Position of (Casting unit))
      • Custom script: bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 1200.00 of TTE_Point) and do (Actions)
        • Loop - Actions
          • Set TTE_TempUnit = (Picked unit)
          • Set TTE_TempHandle = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (TTE_TempUnit is alive) Equal to True
              • (TTE_TempUnit belongs to an enemy of (Owner of (Casting unit))) Equal to True
            • Then - Actions
              • Hashtable - Save (6.00 + (2.00 x (Real((Level of The Third Eye for (Casting unit)))))) as (Key TTE_DurationHandle) of (Key TTE_TempHandle) in TTE_HastTable
              • Hashtable - Save (Unit: TTE_TempUnit's Real Field: Sight Radius ('usir')) as (Key TTE_SightradiusHandle) of (Key TTE_TempHandle) in TTE_HastTable
              • Unit - Create 1 Dummy (Hypnotic Void) for (Owner of (Casting unit)) at TTE_Point facing TTE_Point
              • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
              • Unit - Add The Third Eye (Dummy Ability) to (Last created unit)
              • Unit - Set level of The Third Eye (Dummy Ability) for (Last created unit) to (Level of The Third Eye for (Casting unit))
              • Unit - Order (Last created unit) to Neutral Dark Ranger - Silence TTE_Point
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (TTE_TempUnit is A Hero) Equal to True
                • Then - Actions
                  • Unit - Set Unit: TTE_TempUnit's Real Field: Sight Radius ('usir') to Value: 400.00
                  • Unit Group - Add TTE_TempUnit to TTE_Group
                • Else - Actions
                  • Unit - Set Unit: TTE_TempUnit's Real Field: Sight Radius ('usir') to Value: 0.00
                  • Unit Group - Add TTE_TempUnit to TTE_Group
            • Else - Actions
              • Unit - Create 1 Dummy (Hypnotic Void) for (Owner of (Casting unit)) at TTE_Point facing TTE_Point
              • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
              • Unit - Add The Third Eye (Dummy Ability) to (Last created unit)
              • Unit - Set level of The Third Eye (Dummy Ability) for (Last created unit) to (Level of The Third Eye for (Casting unit))
              • Unit - Order (Last created unit) to Neutral Dark Ranger - Silence TTE_Point
      • Custom script: RemoveLocation(udg_HypnoticVoid_CastPoint)
This is the script which casts (when allied units/caster owned units are nearby) the dummy spell. However, it seems to (when reducing the units vision) include the allied units as well, except it permanently reduces their vision (the allied/caster owned units vision).

Edit: Really subtle difference, so it seems really strange that it affects the allied units...

Edit Edit: Just realised it, but this leaks. I haven't got round to changing the updating the RemoveLocation custom script. But, to be honest, I don't think that should affect this trigger too adversely.

Edit Edit Edit: Just attempted to have the vision reduction effect activate in the "TheThirdEyeEffect" (The count down ever 0.1 seconds trigger part). I was hoping this would sort out the vision changed when it turns from night to day and visa versa. Unfortunately, moving it to the effect part of the trigger just makes the vision pulse between the units original vision and changed vision for the duration of the debuff, so now its worse.
 
Last edited:
Level 4
Joined
Sep 25, 2018
Messages
81
Can’t you modify sight range by giving the unit the bonus sight range ability with a negative bonus? That’s how BonusMod did sight range many moons ago.
Do you mean by using the item ability Goblin Night Scope / Night Elf Ultravision? Unfortunately, there are no parameters for changing anything when using that ability...
 
Level 9
Joined
Jul 30, 2018
Messages
445
So you want it to affect all units, regardless if they are enemies or not? Just remove the "(TTE_TempUnit belongs to an enemy of (Owner of (Casting unit))) Equal to True" condition.

About the Ultravision ability, yeah that seems like an interesting idea. Although, I can't find any adjustable stats either, so the sight radius increase must be hard-coded. :s
 
Level 4
Joined
Sep 25, 2018
Messages
81
So you want it to affect all units, regardless if they are enemies or not? Just remove the "(TTE_TempUnit belongs to an enemy of (Owner of (Casting unit))) Equal to True" condition.

About the Ultravision ability, yeah that seems like an interesting idea. Although, I can't find any adjustable stats either, so the sight radius increase must be hard-coded. :s
I believe the Ultravision ability just makes you have day vision at night.
So you want it to affect all units, regardless if they are enemies or not? Just remove the "(TTE_TempUnit belongs to an enemy of (Owner of (Casting unit))) Equal to True" condition.
It’s not supposed to affect allies, but it does. That’s my problem. If I make it so that the dummy spell is cast when allies are near by, even though they are not given the debuff (which is what I want because the spell shouldn’t affect allies), they still have their vision reduced. What makes it worse is that because they don’t receive the debuff, their vision is reduced permanently. They shouldn’t be affected at all...
 
Level 4
Joined
Sep 25, 2018
Messages
81
Well, that's strange. Ally units should not pass the condition TempUnit belongs to an enemy of Casting Unit, thus they should not be affected in any way. Maybe try Triggering Unit instead of Casting Unit?
Yeah, you were right. It was because I had it as enemy of Casting Unit, rather than Triggering Unit. Its now working properly!

Now I am trying to make it so that it keeps the reduced vision (while the debuff is active) when it changes from night to day or visa versa.
 
Status
Not open for further replies.
Top