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

a question on leaks & visibility

Status
Not open for further replies.
Level 8
Joined
Jan 8, 2010
Messages
493
g'day.
on leaks.
i was thinking on some leaks, and was thinking. is this possible? or should i really remove the location first before setting it to another location?
  • Untitled Trigger 001
    • Actions
      • Set TempLoc = (Position of (Triggering unit))
      • Unit - Create 1 Footman for Player 1 (Red) at TempLoc facing Default building facing degrees
      • Set TempLoc = (Center of (Playable map area))
      • Unit - Create 1 Footman for Player 1 (Red) at TempLoc facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_TempLoc)
and visibility.
on some maps i played, during cinematics, the whole map, or maybe much part of the map visible to the screen, is visible (without black mask). then after the cinematics the black mask is covered again, thus showing only the region visible to the unit. after a while playing, cinematics(2) played, the whole area is again visible, then after the cinematics(2), the area is again covered with black mask, while the areas you explored before cinematics(2) is not in black mask. my problem is this: how do you make that? i tried disabling/destroying a visibility, but i'm having problems with it (it only renders the area fogged, not black masked), and if i make it that every after cinematics i black mask the area, my explored areas are also black masked.
 
Last edited:
Level 37
Joined
Mar 6, 2006
Messages
9,240
  • Untitled Trigger 001
    • Actions
      • Set TempLoc = (Position of (Triggering unit))
      • Unit - Create 1 Footman for Player 1 (Red) at TempLoc facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_TempLoc)
      • Set TempLoc = (Center of (Playable map area))
      • Unit - Create 1 Footman for Player 1 (Red) at TempLoc facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_TempLoc)
You need to clear it every time you set the variable to point to new location.
 
Level 7
Joined
Oct 14, 2008
Messages
340
You know there's an alternative here..
  • Untitled Trigger 001
    • Actions
      • Set TempLoc = (Position of (Triggering unit))
      • Unit - Create 1 Footman for Player 1 (Red) at TempLoc facing Default building facing degrees
      • Custom script: call MoveLocation(udg_TempLoc,GetRectCenterX(GetPlayableMapRect()),GetRectCenterY(GetPlayableMapRect()))
      • Unit - Create 1 Footman for Player 1 (Red) at TempLoc facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_TempLoc)
moving the location will assure that you aren't writing over the old location with your variable.. although the MoveLocation function is a lot easier to work with in jass, because it takes an X and Y.
 
Level 8
Joined
Jan 8, 2010
Messages
493
is the MoveLocation custom script used as is? like i mean, no value for GetRectCenterX, etc? i'm still a GUI-man so i'm not that used yet (actually 0% yet) to using JASS. how do i make sure that the point for MoveLocation is a certain point?
 

sPy

sPy

Level 21
Joined
Apr 10, 2009
Messages
268
.....and visibility.
on some maps i played, during cinematics, the whole map, or maybe much part of the map visible to the screen, is visible (without black mask). then after the cinematics the black mask is covered again, thus showing only the region visible to the unit. after a while playing, cinematics(2) played, the whole area is again visible, then after the cinematics(2), the area is again covered with black mask, while the areas you explored before cinematics(2) is not in black mask. my problem is this: how do you make that? i tried disabling/destroying a visibility, but i'm having problems with it (it only renders the area fogged, not black masked), and if i make it that every after cinematics i black mask the area, my explored areas are also black masked.

Go to Scenario > Map Options
I think you haven't unchecked "Masked Areas Are Partically Visible"
Uncheck it, and test your map again.
 
Level 7
Joined
Oct 14, 2008
Messages
340
is the MoveLocation custom script used as is? like i mean, no value for GetRectCenterX, etc? i'm still a GUI-man so i'm not that used yet (actually 0% yet) to using JASS. how do i make sure that the point for MoveLocation is a certain point?

Ah, well where I put "GetRectCenterX()" and "GetRectCenterY()" are where you would put x and y values for your location. GetRectCenterX/Y(<rect>) will give you the coordinates of then centerpoint of <rect>
 
Level 8
Joined
Jan 8, 2010
Messages
493
Go to Scenario > Map Options
I think you haven't unchecked "Masked Areas Are Partically Visible"
Uncheck it, and test your map again.

doesn't that just make it so that at map initialization the unexplored areas are a little visible? what i mean is that for example my map is black masked at start (the real black, dark, non-see-able), then a cinematic is run, so as not to ruin the cinematic effect i make the area visible to the screen not black masked (includes cliffs, behind trees, etc), then after the cinematic i restore the black mask so that unexplored areas (in this example cliffs, behind trees) are again black masked. my problem is that restoring that black mask also black masks my explored areas, making it look like i did not pass that certain area (in most parts to trigger that cinematic, or simply i'm midway into the game). i want to know how to do it. i was looking at cinematics tutorials here but can't seem to find something about Visibilities.

Ah, well where I put "GetRectCenterX()" and "GetRectCenterY()" are where you would put x and y values for your location. GetRectCenterX/Y(<rect>) will give you the coordinates of then centerpoint of <rect>

so that's why you said it's better for using JASS, since it uses x and y values. thanks! i'll try that :)
 
Status
Not open for further replies.
Top