11-05-2024, 06:15 PM
(This post was last modified: 11-05-2024, 06:16 PM by DerVVulfman.)
EDIT 1:
Well, I said I was considering 'proper formatting'... It sure helped. Consider THIS:
#--------------------------------------------------------------------------
# * Get map name
#--------------------------------------------------------------------------
def map_name
return load_data('Data/MapInfos.rxdata')[@map_id].name
end
#--------------------------------------------------------------------------
# * Frame Update: What tiles have been discovered or not currently covered
#--------------------------------------------------------------------------
def update_fow_grid
px = $game_player.x
py = $game_player.y
x = px - @fow_range
start_y = py
y = start_y
count = 1
mod = 1
I think I kinda found WHERE to perform a simple bit of 'surgery' to the original script. The below change works:
#--------------------------------------------------------------------------
# * Frame Update: What tiles have been discovered or not currently covered
# px : (Optional) x coordinate for target event revealing map
# py : (Optional) y coordinate for target event revealing map
#--------------------------------------------------------------------------
def update_fow_grid(px=$game_player.x, py=$game_player.y)
# Define x/y update coordinates based on passed x/y values
x = px - @fow_range
start_y = py
y = start_y
count = 1
mod = 1
AND... it actually works.
By doing so, I can insert x/y coordinates into the command to reveal 'areas' outside of the player's coordinates, assuming I also pass a couple other commands too:
This was the result, the events around me vanished while the events in the 'circled' dynamic area were visible. Fixed by re-executing the commands with the focus on the player.
Current WIP demo:
Fog of War Demo - Copy.zip (Size: 936.37 KB / Downloads: 1)
Well, I said I was considering 'proper formatting'... It sure helped. Consider THIS:
#--------------------------------------------------------------------------
# * Get map name
#--------------------------------------------------------------------------
def map_name
return load_data('Data/MapInfos.rxdata')[@map_id].name
end
#--------------------------------------------------------------------------
# * Frame Update: What tiles have been discovered or not currently covered
#--------------------------------------------------------------------------
def update_fow_grid
px = $game_player.x
py = $game_player.y
x = px - @fow_range
start_y = py
y = start_y
count = 1
mod = 1
I think I kinda found WHERE to perform a simple bit of 'surgery' to the original script. The below change works:
#--------------------------------------------------------------------------
# * Frame Update: What tiles have been discovered or not currently covered
# px : (Optional) x coordinate for target event revealing map
# py : (Optional) y coordinate for target event revealing map
#--------------------------------------------------------------------------
def update_fow_grid(px=$game_player.x, py=$game_player.y)
# Define x/y update coordinates based on passed x/y values
x = px - @fow_range
start_y = py
y = start_y
count = 1
mod = 1
AND... it actually works.
By doing so, I can insert x/y coordinates into the command to reveal 'areas' outside of the player's coordinates, assuming I also pass a couple other commands too:
This was the result, the events around me vanished while the events in the 'circled' dynamic area were visible. Fixed by re-executing the commands with the focus on the player.
Current WIP demo:
Fog of War Demo - Copy.zip (Size: 936.37 KB / Downloads: 1)