• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Issues with Visibility Modifiers

Status
Not open for further replies.
So, I am writing a system to mimic Gap Generators from Red Alert. The idea is that units can create a modifier that resets the black mask (or fog of war) state while they are alive. However, this system seems to break in the sense that if the unit is killed, the visibility still remains when it suppose to be erased. Where did I went wrong or is my map somehow corrupted?
 

Attachments

  • GapGenerator.w3x
    34.3 KB · Views: 7
So, I am writing a system to mimic Gap Generators from Red Alert. The idea is that units can create a modifier that resets the black mask (or fog of war) state while they are alive. However, this system seems to break in the sense that if the unit is killed, the visibility still remains when it suppose to be erased. Where did I went wrong or is my map somehow corrupted?
Hard to say much without any triggers, but it should be a VisibilityModifier that you manage per Gap Generator (for example using an indexer) and clean it up on its death.
Unsure if you want to un-black-mask it on-death or just let it be explored next time someone sees it.
 
Level 15
Joined
Feb 7, 2020
Messages
398
I believe one of the issues is that you are creating a modifier periodically but only storing the most recently created one in memory after assigning it based on unit index. The rest that were made are still around as enabled modifiers.

You probably need to store each item in a table, then loop through and disable/destroy all of them when the matching unit index is removed or killed.

However, it's not clear to me if this would solve the issue. If I recall, global modifiers (such as black mask enabled) can conflict with modifiers that are toggled off and on. But you'll have to let us know if you experiment and find that out.
 
I believe one of the issues is that you are creating a modifier periodically but only storing the most recently created one in memory after assigning it based on unit index. The rest that were made are still around as enabled modifiers.

You probably need to store each item in a table, then loop through and disable/destroy all of them when the matching unit index is removed or killed.

However, it's not clear to me if this would solve the issue. If I recall, global modifiers (such as black mask enabled) can conflict with modifiers that are toggled off and on. But you'll have to let us know if you experiment and find that out.
I didn't notice this post. Very terrible of me.

This seems to be a lead I can use to resolve the issue. I'll take some time to look deeper into this.

Something I take from this is that I better treat this issue in an indexing like structure as opposed to the unit indexer approach. I'll try this.

I absolutely love your enthusiasm for creating a system inspired by Gap Generators from Red Alert! Your ingenuity in trying to simulate the fog of war reset adds an exciting layer to your project. It seems like you've delved deep into the intricacies of the mechanics
Well, there are some issues till now. This is meant to be a system for mapmakers to use if they want to mimic Red Alert
 
Status
Not open for further replies.
Top