• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Spell] Unexplained Vision Bug - Please Help?

Status
Not open for further replies.
Level 3
Joined
Feb 25, 2019
Messages
35
The Issue: Triggered abilities (some, not all) are causing small parts of the map to be revealed on use, but the vision goes away after the dummy units in the abilities expire. Also, a note: I've tested this with one of the actual trigger abilities in this game instead of this test command one, and the location that is revealed follows the position of my unit. If I walk to the right for 3000 units, then use the ability there, the revealed part of the map will be 3000 units to the right as well.

I'm going to provide as much information as I can, but I will try to be concise: I am brand new to this. I am trying to learn as much as I can. I have remade everything I've done ~3-4x from 'learning about a new leak' I wasn't aware of before. Multiple of my triggered abilities in this map cause this phenomenon and I can't find any information on it.

The spell used as an example was something I was just testing to figure out the orientation of dummy units for target point spell casting missiles through carrion swarm, but then I realized it does the same thing that other abilities have done and decided to use it to try and find a source. This is the trigger spawning the dummy units & causing the visual glitch (for this example, but multiple triggers do this):

TriggerMap1.PNG


This is to show the actual issue... first, a 'before' image:

PriorToTriggerMap1.PNG


During (shows the actual issue):

DuringTriggerMap1.PNG


And here is what can be seen at that actual location as it appears:

DuringTriggerMap2.PNG


Also, don't know how to formally do this, but shout-out to Tarrasque for the medic model, Vortigon for the DarkOrb model, and General Frank for the DwarfWarrior model shown in the screenshots. Fantastic models!
 

Attachments

  • TriggerMap1.PNG
    TriggerMap1.PNG
    29.7 KB · Views: 46
Last edited:
Level 39
Joined
Feb 27, 2007
Messages
5,011
Are you certain your dummy units have no sight radius and their minimal icons are turned off in the OE? Are they able to freely cast any other spells when spawned (you should add abilities to them when you create them, not in the OE).

Try giving your dummies a really obvious model like abominations to see how many of them there are and in what formation.
 
Level 3
Joined
Feb 25, 2019
Messages
35
Are you certain your dummy units have no sight radius and their minimal icons are turned off in the OE? Are they able to freely cast any other spells when spawned (you should add abilities to them when you create them, not in the OE).

Try giving your dummies a really obvious model like abominations to see how many of them there are and in what formation.
You had the same line of thinking as me. The second gameplay screenshot in my original post is exactly that, the dummy units are unseen in the actual test, but I changed them to the model of the hero so I could see them. Their sight radius was not off but I was aware of this. My concern was that error on my part was causing them to mistakenly spawn in that location, so I actually put the sight on them to see if that was going on. The issue is, all dummy units are accounted for in that screenshot. The minimap icons are off in the OE. I'll try adding the ability to them in the GUI, but could you perhaps explain the reasoning? I trust you, just want to understand.
 
Level 39
Joined
Feb 27, 2007
Messages
5,011
It would help if you uploaded your map here as an attachment. If you really don't want to/can't do that then post the full text of your trigger so we can read through all of it. Nothing in the little snippet you showed should cause anything to get created way across the map.

With regard to dummies and abilities it is generally better to do things this way:
  • Unit - Create 1 Dummy at somewhere facing Default building facing
  • Unit - Add a 2.00 second generic expiration timer to (last created unit)
  • Unit - Add Carrion Swarm to (last created unit)
  • Unit - Set Level of Carrion Swarm for (last created unit) to X
  • Unit - Order (Last Created Unit) to Undead Dreadlord - Carrion Swarm somewhere
The benefit is that you only need to have 1 dummy unit-type for your whole map instead of 1 per spell/unit/hero/whatever. The reason you don't add ALL your dummy abiltiies to that dummy unit-type in the OE is that the abilities will collide when a unit has 2 or more with the same base orderstring and attempts to cast one of them. Instead it will actually attempt to cast both simultaneously and as a result you can't be sure which one it will actually use (or it casts neither). By only adding the abilities you need when you need them you can be sure your dummies won't have any spellcast collisions.
 
Last edited:
Level 3
Joined
Feb 25, 2019
Messages
35
It would help if you uploaded your map here as an attachment. If you really don't want to/can't do that then post the full text of your trigger so we can read through all of it. Nothing in the little snippet you showed should cause anything to get created way across the map.

With regard to dummies and abilities it is generally better to do things this way:
  • Unit - Create 1 Dummy at somewhere facing Default building facing
  • Unit - Add a 2.00 second generic expiration timer to (last created unit)
  • Unit - Add Carrion Swarm to (last created unit)
  • Unit - Set Level of Carrion Swarm for (last created unit) to X
  • Unit - Order (Last Created Unit) to Undead Dreadlord - Carrion Swarm somewhere
The benefit is that you only need to have dummy unit-type for your map instead of 1 per spell/unit/hero/whatever. The reason you don't add ALL your dummy abiltiies to that dummy unit-type in the OE is that the abilities will collide when a unit has 2 or more with the same base orderstring and attempts to cast one of them. Instead it will actually attempt to cast both simultaneously and as a result you can't be sure which one it will actually use (or it casts neither). By only adding the abilities you need when you need them you can be sure your dummies won't have any spellcast collisions.
Thank you for the advice on the dummy abilities, that is definitely a better way of doing it. Unfortunately, that is the entire trigger resulting in this phenomenon. It is just a test trigger I made to observe changes in the parameters of the ability I was dummy-casting... It is just a -player chat event "-Test4"- trigger. If you say it can't cause it, then it must be an issue of my variables being linked through multiple triggers... I guess causing it through an interaction with them? The "PlayerUnit[x]" variable is a unit array where I assign the player number of the player selecting their hero as the index, the unit as the value for the variable (that they select). I guess I will have to look into that?
 
Level 39
Joined
Feb 27, 2007
Messages
5,011
Yes it is likely more complicated and involves other triggers. That's why I suggested you post the map :)

In the WE, click Module > Object Manager > Variables (or press F11 > Variables) you can see which triggers that use each of your variables to help with debugging.
 
Level 3
Joined
Feb 25, 2019
Messages
35
Sight Range - 0 (Day and Night)
Object Editor
Hey - I know to have sight off, my concern is more that they would need to be there (wouldn't they?) to grant sight, not that they have sight. Like, I'm worried about leaks since I know very little about them.
 
Hey - I know to have sight off, my concern is more that they would need to be there (wouldn't they?) to grant sight, not that they have sight. Like, I'm worried about leaks since I know very little about them.

Ain't the caster provide sufficient sight already? And since it's point target, all abilities aiming to point except blink doesn't need vision for usage.

Your triggers are quite leakless. A minor improvement would be sending Last created unit into a variable.
 
Level 3
Joined
Feb 25, 2019
Messages
35
Ain't the caster provide sufficient sight already? And since it's point target, all abilities aiming to point except blink doesn't need vision for usage.

Your triggers are quite leakless. A minor improvement would be sending Last created unit into a variable.
Yeah, your suggestion is something I learned recently while reading up on all of this (brand new). I've started trying to use temp unit variables instead of last created unit. That one in particular isn't intended to be a part of the map, only to test how certain characteristics change the appearance of the ability (missile speed, AoE, size of the center unit). It is a simulation of one part of an ability I have finished now (wasn't finished when I made the post). In the finished ability, the units have 0 sight. I actually noticed this sight thing happening very early into making this map (first map I've worked on) before knowing to turn sight to 0 on units, which raised a red flag. Now, my concern isn't that I am granted vision in that region bc I don't want the vision, my concern is how is vision being granted there? A simple solution to stopping the vision is, like you said, setting the vision to 0, which I will do anyway... but the problem causing that area to be interacted with at all still exists and I have no clue what it is.
 
Status
Not open for further replies.
Top