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

Managable Vision

Status
Not open for further replies.
Level 5
Joined
Mar 21, 2007
Messages
155
hi. ok so i want to make some sort of system in my map where, basicly, you enter a region, or acquire an item, and you get the vision of a certain area. when you drop the item, leave the region, the vision goes and is replaced with fog of war. problem i think comes here.

this is my initialization trigger

  • instilisation stuff
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Visibility - Enable fog of war
      • Visibility - Enable black mask
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Visibility - Create an initially Enabled visibility modifier for (Picked player) emitting Fog of war across (Area 1) <gen>
          • Visibility - Create an initially Enabled visibility modifier for (Picked player) emitting Fog of war across (Area 2) <gen>
          • Visibility - Create an initially Enabled visibility modifier for (Picked player) emitting Fog of war across (Area 3) <gen>
          • Visibility - Create an initially Enabled visibility modifier for (Picked player) emitting Fog of war across (Area 4) <gen>
i have 1 more area. i would like it to be left alone. so that its black, but when you explore it, it becomes fogged of wared.

how do i make a easy manageable system whereby people can have more than 1 vision type at a time. (if variables e.c.t are needed, then i imagine no more than 7 visions per player)

ty
 
Level 5
Joined
Jan 3, 2008
Messages
164
First of all your initilisation trigger should be changed if you want players not to see the regions from the beginning(I am afraid you will need 8 variables per player and that is for 4 zones only):
  • Map Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Visibility - Enable fog of war
      • Visibility - Enable black mask
      • Visibility - Create an initially Disabled visibility modifier for Player 1 (Red) emitting Visibility across (Area1)
      • Set VisabilityArea1_1Player1 = (Last created visibility modifier)
      • Visibility - Create an initially Disabled visibility modifier for Player 1 (Red) emitting Visibility across (Area2)
      • Set VisabilityArea2_1Player1 = (Last created visibility modifier)
      • Visibility - Create an initially Disabled visibility modifier for Player 1 (Red) emitting Visibility across (Area3)
      • Set VisabilityArea3_1Player1 = (Last created visibility modifier)
      • Visibility - Create an initially Disabled visibility modifier for Player 1 (Red) emitting Visibility across (Area4)
      • Set VisabilityArea4_1Player1 = (Last created visibility modifier)
      • Visibility - Create an initially Enabled visibility modifier for Player 1 (Red) emitting Fog of war across (Area1)
      • Set VisabilityArea1_2Player1 = (Last created visibility modifier)
      • Visibility - Create an initially Enabled visibility modifier for Player 1 (Red) emitting Fog of war across (Area2)
      • Set VisabilityArea2_2Player1 = (Last created visibility modifier)
      • Visibility - Create an initially Enabled visibility modifier for Player 1 (Red) emitting Fog of war across (Area3)
      • Set VisabilityArea3_2Player1 = (Last created visibility modifier)
      • Visibility - Create an initially Enabled visibility modifier for Player 1 (Red) emitting Fog of war across (Area4)
      • Set VisabilityArea4_2Player1 = (Last created visibility modifier)
The first four visability modifiers are disabled at the beginning so that player1 wont be able to see those areas. The last four visability modifiers are there enabled to create fog of war at those 4 areas for player 1 only. Now here is the trigger for when a player1 enters a region, he will be able to see another place as well:
  • Enter region1
    • Events
      • Unit - A unit enters (Region1)
    • Conditions
    • Actions
      • Visibility - Enable VisabilityArea1_1Player1
      • Visibility - Disable VisabilityArea1_2Player1
Here is the trigger when the player1 leaves that area:
  • Leaves region1
    • Events
      • Unit - A unit leaves (Region1)
    • Conditions
    • Actions
      • Visibility - Disable VisabilityArea1_1Player1
      • Visibility - Enable VisabilityArea1_2Player1
Here is a trigger for if player 1 pics up an item he can see another area:
  • Unit gets an item
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item being manipulated) Equal to (item)
      • (Owner of (Triggering unit)) Equal to Player 1 (Red)
    • Actions
      • Visibility - Enable VisabilityArea1_1Player1
      • Visibility - Disable VisabilityArea1_2Player1
Here is a trigger for if player 1 looses an item and he cant see the other area:
  • Unit looses an item
    • Events
      • Unit - A unit Loses an item
    • Conditions
      • (Item being manipulated) Equal to (item)
      • (Owner of (Triggering unit)) Equal to Player 1 (Red)
    • Actions
      • Visibility - Disable VisabilityArea1_1Player1
      • Visibility - Enable VisabilityArea1_2Player1
Those regions will take you quite a time. If this was helpfull to you dont hesitate to give me a +rep :p
 
Level 5
Joined
Mar 21, 2007
Messages
155
oh. i am very sorry. i must have not said it correctly. i am not wanting visibility for the areas, i am wanting visibility for inside those areas.

(e.g. in area 1, there is a wall with a "window" through it. so i want it so that when a player moves close enough to the wall (a region next to the wall) he can see on the other side of the wall (just a region on the other side). this is all inside area 1. i would like this system to apply to a lot of regions, so.... thats why i am asking how i could do it in a easy, but leak-proof way.

sorry if i am not clear...
 
Last edited:
Status
Not open for further replies.
Top