• 🏆 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!

Visibility modifiers won't go away

Status
Not open for further replies.
Level 6
Joined
Aug 25, 2004
Messages
336
These blasted visibility modifiers won't go away. I make one for a period, then when I want it to go away it won't no matter what I do. I've tried disabling them, destroying them, then running them over with another visibility modifier for black mask and I can STILL see the areas they revealed!
 
Level 6
Joined
Aug 25, 2004
Messages
336
I've tried destroying them and I can still see the area. I've destroyed them then put down one over the area for black mask and it still shows. I can only assume it's not destroying it.

As for variables, not sure how to use variables with visibility modifiers. When you say "assigned it to a variable" I don't see any way to do that. *shrug*
 
Level 22
Joined
May 11, 2004
Messages
2,863
Well, visibility modiefiers are nearly impossible to use WITHOUT variables. Click the variables tab in the trigger editor (looks like an X) and create a few visibility modifier-type varables and use the "set varable" trigger action to set them to the regions. Then just refer to those varables when you use triggers to create and destroy visibility modifiers.
-VGsatomi
 
Level 6
Joined
Aug 25, 2004
Messages
336
I don't get an option to set a visibility modifier-type variable to a region, which limits it to another visibility modifier-type variable (utterly useless) or the last created visibility modifier (which gives results identical to if I just say "destroy last created visibility modifier"). I never was particularly good with variables, but I really don't see how I can set a visibility modifier-type variable to a region, not with basic WE at least...
 
Level 7
Joined
Mar 12, 2006
Messages
407
Trigger 1:visibility
Event
Spieler - Spieler 1 (Rot) types a chat message containing vision as Exakte Ãœbereinstimmung
Condition
Action
Visibilty - Create an initially activated visibility modifier for Player 1 (Rot) emitting Visibility across (Playable map area)
Set vision = (Last created visibility modifier)

Trigger2:visibiltity off
Event
Spieler - Spieler 1 (Rot) types a chat message containing vision off as Exakte Ãœbereinstimmung
Condition
Action
Visibility - Disable vision
Visibility - Destroy vision

-------
vision is a visibility-type var as VG already said.
I'm using german WE but i tried to translate relevant parts of my trigger so u may understand it
 
Level 6
Joined
Aug 25, 2004
Messages
336
*sigh* That's exactly what I've been doing- setting it to the last created visibility modifier. It still doesn't get rid of it when I try to tell it to. I even try telling it to disable it, destroy it, THEN set down a new one for black mask. The visibility still remains. Am I missing some version of WE or something?
 
Level 7
Joined
Mar 12, 2006
Messages
407
Okey
You have this visibility modifier activated on a region where you can actually see nothing but black

creating a visibility modifier which grants visibility over a region disables black mask and fog of war in that region.
If you want to "reset" that region to its former state you will have to deactivate visibility, destroying the modifier is not necessary you may reactivate it later, if needed.
if it is disabled you still have no black mask so you have to create a visibility modifier which enables black mask in that region. And i'm not talking about that visibility - enable black mask trigger. That is a global one, you need to do a local one.


Hope it helps.
 
Level 6
Joined
Aug 25, 2004
Messages
336
Yes, I'm doing what you're telling me to do and I'm still getting no black mask over the area.

In one trigger I have:
Code:
Player Group - Pick every player in (All players) and do (Actions)
    Loop - Actions
        Visibility - Create an initially Enabled visibility modifier for (Picked player) emitting Visibility across Cinematic View <gen>
Set visibility = (Last created visibility modifier)

Then in the next I have:
Code:
Visibility - Disable visibility
Player Group - Pick every player in (All players) and do (Actions)
    Loop - Actions
        Visibility - Create an initially Enabled visibility modifier for (Picked player) emitting Black mask across Cinematic View <gen>

Is this not what I'm supposed to do, because from what you're saying it seems to be.
 
Level 7
Joined
Mar 12, 2006
Messages
407
Mhm that works fine for me, just tested it


Try it like this:
Trigger 1:
Actions
Pick every player etc... :
Create an initially deactivated modifier emitting visibility
Set visibility = last...
Create an initially activated modifier emitting black mask
set mask = laast...

Trigger 2:
Actions
disable mask
Enable visibility

Trigger 3:
disable visibility
enable mask

----
That should work for sure
 
Level 6
Joined
Aug 25, 2004
Messages
336
I'd like to say that that worked, but I'm afraid it didn't. I ran a few tests, and the problem is it doesn't seem to disable it when I have the modifier activated for the picked player (everyone). It turned it off when I just told it to make a modifier for red, but when I tell it to pick everyone and make it for the picked player the disable function seems not to work. I suppose I could make a separate modifier for each player but that'd be 11 times the work, and it seems like it should work but something is just going wrong.
 
Level 6
Joined
Aug 25, 2004
Messages
336
Well, I went and set a different modifier for each individual person in each trigger and now it's working. Thank GOD for copy and paste or that would have taken forever. Thanks for the help.
 
Level 7
Joined
Jul 30, 2004
Messages
451
copy and paste is never really an elegant solution

were you using a visibility modifier array? because if you weren't and you tried to remove them all with a single variable you would have
vismodifier variable VISION

create modifier (0x0000)
set VISION = last created modifier [so VISION is 0x0000]

create modifier (0x0001)
set VISION = last created modifier [so VISION is 0x0001]

etc...

and if you tried to remove all the modifiers, you'd only have access to the last one you made through VISION

so
Code:
for int A = 1 to 8
    create modifier for player A at whatever
    set VISION[A] = last created modifier
    //(or VISION[A + mod] if you use it for more than just 1 modifier per player)
end loop

and when removing
for int A = 1 to 8
    destroy VISION[A]
end loop
 
Level 6
Joined
Aug 25, 2004
Messages
336
Uhh... don't think you quite understood what I said. It's working fine now, I just had to make a separate modifier for each player. I used a different variable for each modifier. The problem had nothing to do with removing one of multiple modifiers, it was that it won't disable a modifier if it pertains to more than one player, for some reason. But that's all besides the point, I have it working fine now.

And by copy and paste I meant I made a modifier for one player, then copied and pasted it and changed it to pertain to the next player, etc. so that I wouldn't need to make each function from scratch.
 
Level 7
Joined
Jul 30, 2004
Messages
451
well, if it works it works, i was just saying a non-generalized solution (ie copied for each player) is generally less elegant than a single function that performs for all players (or a subset depending on what you send it)

but still, the little blurb i wrote is what creates a modifier for each player and will destroy the modifiers for each player without having to copy anything, and in about 8 short lines...you just have to use a loop and a vis modifier array

but again, if it works it works
 
Status
Not open for further replies.
Top