• 🏆 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!
  • ✅ Time to vote for the top 3 models! The POLL for Hive's 6th HD Modeling Contest: Mechanical is now open! 📅 Poll close on July 16, 2024! 🔗 Cast your vote now!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

Help! Fog of War, Enabling it after Disabling it

Status
Not open for further replies.
Level 8
Joined
Oct 1, 2010
Messages
408
I have been working on WoW Risk for little while (Priwin has given me permission to do so) and I just got started on modifying the black mask in the triggers. My problem is that I'm trying to apply a black mask over an after it has been uncovered by a rect in a visibility emitting trigger.

I'll try and outline the issue in words. Priwin has made it so fog of war and black mask are disabled at the start of the game. Black mask is then later re-enabled if certain conditions are met. Three visibility emitting triggers are then applied to three different regions for all 12 players and he stores this in a variable which he later destroys. However, one of the three rects emits visibility over a terrain area I've created that I don't want exposed. I've thought about this and all I can think of is to shorten up the rect that is overlapping the area I don't want exposed, and then creating a fourth rect to cover up the area that will be uncovered from shortening the third rect. However, this would also require me to make changes to other triggers that reference these rects and it would just be alot cleaner if I could just re-apply black mask to the exposed terrain after the visibility emitting trigger has been run. I'm not sure if this is possible, but any help is really appreciated. Thanks!

  • Do Multiple ActionsFor each (Integer A) from 1 to 12, do (Actions)
    • Loop - Actions
      • Visibility - Create an initially Enabled visibility modifier for (Player((Integer A))) emitting Visibility across Exodus1 <gen>
      • Set exodusvisible[(Integer A)] = (Last created visibility modifier)
      • Visibility - Create an initially Enabled visibility modifier for (Player((Integer A))) emitting Visibility across Exodus2 <gen>
      • Set exodusvisible[((Integer A) + 12)] = (Last created visibility modifier)
      • Visibility - Create an initially Enabled visibility modifier for (Player((Integer A))) emitting Visibility across Exodus3 <gen>
      • Set exodusvisible[((Integer A) + 24)] = (Last created visibility modifier)
Here's what I tried, which obviously did nothing.

  • Loop - Actions
    • Visibility - Create an initially Enabled visibility modifier for (Player((Integer A))) emitting Black mask across ExodusDeepholm <gen>
I'm thinking that there is no way to fix this, since the trigger that emits visibility stays active until its destroyed, so it seems to me like it would just override any black mask visibility triggers that I put over the same area, but I'm hoping I'm wrong. However my searches on these forums only seem to confirm that this is not fixable. Just thought I'd check first. I'm also a total noob at triggering, so I'm sorry if any of this was confusing or misinformative.

I've also attached a map that contains most of WoW Risk's triggers, though it doesn't contain everything WoW Risk does, so I'm sorry if it has errors. The map does use vJass so you would need NewGen to open it.

Thanks again for any help! Sorry for the long post.
 

Attachments

  • WoWRiskTestMap.w3x
    2.3 MB · Views: 69
Level 8
Joined
Oct 1, 2010
Messages
408
do you mean that there are 3 rects and you happen to create a place which overlaps with one of the 3 rects ? and you tried to shorten it and places another trigger that maskes the place that overlaps it ?

There are three rects that emit visiblity in a trigger, and I am trying to overlap one of them and add black mask to the overlapped area. Hope that makes sense.
 
Level 11
Joined
Oct 31, 2010
Messages
1,057
cant you make the rect your overlapping smaller and then create another region that is the overlapped area and do
Map install

Pick everyplayer from All player
loop action
enable blackmask for picked player at region
 
Level 8
Joined
Oct 1, 2010
Messages
408
I think this is what you you mean?

  • Do Multiple ActionsFor each (Integer A) from 1 to 12, do (Actions)
    • Loop - Actions
      • Visibility - Create an initially Enabled visibility modifier for (Player((Integer A))) emitting Black mask across Exodus1 <gen>
It does nothing however on the overlapped area. The reason I can't make the first rect smaller though is because the rect is very large and if I make it any less wide then areas that should have black mask will not. I hope this makes sense, I can take a screenshot if you want me to.

Edit: I just now tried using the above trigger again but this time I placed it before the trigger that emits visibility ( I was putting it after it ). However, all this did was make it so the entire area was covered in black mask. So it basically stopped the trigger after it that emits visibility from doing anything. This might just be unsolvable...
 
Level 8
Joined
Oct 1, 2010
Messages
408
why not just do
make it smaller and then if any places that need the blackmask give it
is it so harD?
sorry if i am wrong because i am dumb :C

Well I did mention this in my first post, but if I make more rects for the places that will need blaskmask, then I will have to change quite a few triggers as the rects are not just used to apply black mask but are used for quite a few things and the rects are referenced in the game's triggers quite a bit. It would just be less messy (and less chance of bugs) if I was able to mask over this one area, rather than creating a new rect or two like you suggested. This might be what I end up doing, but I'd rather not if possible.
 
Level 11
Joined
Oct 31, 2010
Messages
1,057
i donno if this way works
make a new trigger that sets your overlapped region with blackmask and put a turn off this trigger at the end code
and tick off initally on
then after the enable trigger for the players who enter it,put turn on trigger the one above
hope this works and hope that its not confusing coz i find it confusing
 
Level 6
Joined
Jun 16, 2007
Messages
235
You cannot black mask a region that has visibility modifier turned ON.
You have to disable old visibility modifiers.

You need to store your visibility modifier in global variables.
(last created visibility modifier)
And then turn them on and off as needed.
 
Level 8
Joined
Oct 1, 2010
Messages
408
You cannot black mask a region that has visibility modifier turned ON.
You have to disable old visibility modifiers.

You need to store your visibility modifier in global variables.
(last created visibility modifier)
And then turn them on and off as needed.

Yeah, this is what I thought but thank you for the confirmation. I needed them to both be active at the same time, thats why variables wouldn't really help, but I guess it's just not possible unless I do it darks way.

maps speak louder then words
here this is wad i mean
well i did disable fog of war like you said so yeah wer both the same ?
it works

Thanks dark! I'll try and give you multiple +rep for being so helpful. Unfortunately, this doesn't work since I need players to be able to explore the region that is overlapping, but in the test map it stays permanately in fog, so it can't be explored.

Thanks alot though for all your help, I guess I'll just have to do this the long way and make another rect etc like we talked about.
 
Status
Not open for further replies.
Top