I was wondering if there was a way to calculate the percentage of the total map that is still under the Black Mask and have that displayed in a dialog box or something. I've been messing around with revealers but can't seem to figure out a way to get what I need. Any help would be appreciated. Thanks.
Or, you could fill the map with points, and just use the detection of points that visible. Then, when each point gets discovered, you should add a percentage to the count, and delete the point that was discovered.
hmm points could probably be useful but after doing a quick scan through the available triggers with points I'm was unable to find one that basically said "point is visible" or with the conditions of "if point is visible == true". There is probably some easy terminology which I'm missing that would solve this problem in an instant. :/
You can do a simple 2 dimensional loop everytime with a real number x and y, then check visiblity of point x,y add up total to calculate percentage.
But if you want the explored part that is not pitch black (where you have visited at least once before) You might have to resort to more complex method
Does the player start in a fixed position? You could have square regions that bound the player and move them around, counting when they are explored.
Edit: now that I think about it, fixed position wouldn't matter. However, dynamic management of regions would be key if you don't want n^2 region count based on a grid. There are also techniques that divide up space well like hierarchical grids. You can accomplish this with square regions I think.
My goal originally was to calculate the areas that have been visited at least once before based solely on visibility related triggers. The more I fiddle around with the trigger editor it seems more likely that I'll have to do something along the lines of what Ultimaswc3 and o3210 suggest and use points or regions.
Although programmer, if there could be a way to do a 2 dimensional loop that could check for area "not under black mask" or something like that it could possibly work as well. I'm still quite new with the galaxy editor and if you have an example of how a 2 dimensional loop that tracks real coordinates X and y I would be ever so grateful.
If you want something easier, you could make a matrix of boolean values. Each boolean value represents explored (true) / unexplored (false). Periodically check player position and do a simple calculation to match it up with a point in the boolean matrix. If the position in the matrix is explored already, do not increment your 'pts_explored' variable. If unexplored, mark it explored and increment 'pts_explored'. %explored_real_value = pts_explored / total_pts.
Edit, oh yea... and by pts I mean # index values in your matrix.
For my method i could suggest creating an invisible unit at each point created, then add each unit to the variable, and make a Comparisson:
Unit is Visible to Player = true;
Unit is in Unit Group = true
Then, when the comparison is true, you just add a percentage to the count, and remove the visible unit from the unit group.
Also, as an event, you could use a 1 second timer for it. at the end of the trigger, create an If statement:
If (Number of units in (Unit Group)) = 0, then
Turn off this Trigger
Else
Do nothing
If you have trouble with counting points, just when each point is created, make variable + 1. Then use the debug screen or make it type a message to the players on the screen.
I could write you a whole trigger, but my editor is in Russian, and that copy-pasting won't help anybody here ;(
I was wondering if there was a way to calculate the percentage of the total map that is still under the Black Mask and have that displayed in a dialog box or something. I've been messing around with revealers but can't seem to figure out a way to get what I need. Any help would be appreciated. Thanks.
I can't think of any way you could actually count the %...
You could split the map up into lots of regions and count the amount of regions entered or something like that?
Yeah that is what I've considered but I was hoping to do it through visibility instead of actually entering every region of the map.
Or, you could fill the map with points, and just use the detection of points that visible. Then, when each point gets discovered, you should add a percentage to the count, and delete the point that was discovered.
@o3210: Go
hmm points could probably be useful but after doing a quick scan through the available triggers with points I'm was unable to find one that basically said "point is visible" or with the conditions of "if point is visible == true". There is probably some easy terminology which I'm missing that would solve this problem in an instant. :/
@Bomhab: Go
There's several type of explored.
You can do a simple 2 dimensional loop everytime with a real number x and y, then check visiblity of point x,y add up total to calculate percentage.
But if you want the explored part that is not pitch black (where you have visited at least once before) You might have to resort to more complex method
@Bomhab: Go
Does the player start in a fixed position? You could have square regions that bound the player and move them around, counting when they are explored.
Edit: now that I think about it, fixed position wouldn't matter. However, dynamic management of regions would be key if you don't want n^2 region count based on a grid. There are also techniques that divide up space well like hierarchical grids. You can accomplish this with square regions I think.
@progammer: Go
My goal originally was to calculate the areas that have been visited at least once before based solely on visibility related triggers. The more I fiddle around with the trigger editor it seems more likely that I'll have to do something along the lines of what Ultimaswc3 and o3210 suggest and use points or regions.
Although programmer, if there could be a way to do a 2 dimensional loop that could check for area "not under black mask" or something like that it could possibly work as well. I'm still quite new with the galaxy editor and if you have an example of how a 2 dimensional loop that tracks real coordinates X and y I would be ever so grateful.
@Bomhab: Go
If you want something easier, you could make a matrix of boolean values. Each boolean value represents explored (true) / unexplored (false). Periodically check player position and do a simple calculation to match it up with a point in the boolean matrix. If the position in the matrix is explored already, do not increment your 'pts_explored' variable. If unexplored, mark it explored and increment 'pts_explored'. %explored_real_value = pts_explored / total_pts.
Edit, oh yea... and by pts I mean # index values in your matrix.
For my method i could suggest creating an invisible unit at each point created, then add each unit to the variable, and make a Comparisson:
Unit is Visible to Player = true;
Unit is in Unit Group = true
Then, when the comparison is true, you just add a percentage to the count, and remove the visible unit from the unit group.
Also, as an event, you could use a 1 second timer for it. at the end of the trigger, create an If statement:
If (Number of units in (Unit Group)) = 0, then
Turn off this Trigger
Else
Do nothing
If you have trouble with counting points, just when each point is created, make variable + 1. Then use the debug screen or make it type a message to the players on the screen.
I could write you a whole trigger, but my editor is in Russian, and that copy-pasting won't help anybody here ;(
Ohh very helpful suggestions, I'm very excited to do some exploring with both of them tonight after work!