Fog of War
#19
The changes recommended actually do nothing.  Allow me to explain.

Within the Game_Character class, the code already reads:

  def update_move
    #
    # Perform the original method
    wachunga_fow_gch_update_move
    #
    # Perform only for dynamic maps (must be FOW)
    if $game_map.fow_dynamic
      # If character moved and not game player
      if (@x != @last_fow_x or @y != @last_fow_y) and self != $game_player
        # Check if character entered or exited player's visual range
        $scene.spriteset.update_event_transparency(self)
      end
    end
    #
    # Record last position
    @last_fow_x = @x
    @last_fow_y = @y
    #
  end
Minor note: I used  @last_fow_x and  @last_fow_x, an alteration if another Game_Character script uses like variables, these specific for the FOG script alone.

By the fact that it first must check that the $game_map.fow_dynamic flag must be on, the map must have fog-of-war engaged.  As such, the inclusion of your  if $game_map.fow condition is actually unnecessary.


Insofar as the changes to GAME_PLAYER, combining the $game_map.fow and  @jump_count == 0 upon a single line within the update_jump method offers no actual change except cosmetic.

For the update_move method within GAME_PLAYER, your line that handles $game_map.fow, the X/Y coordinates and the jumping? test does the same as within this version, so it too is only cosmetic. 

The inclusion of...
    # Update last recorded FOW position
    @last_fow_x, @last_fow_y = @x, @y

... actually means nothing.  Its already been taken care of.

Do recall that before this line, it has the line reading "super".  This means that this method inherits from its superclass, the Game_Character class.   And within Game_Character's own update_move, this update of the player's position is already handled.

Ergo, these changes would do nothing.



EDIT: I just found out that Wachunga released a version after what had been discussed, minor changes within Game Player to accommodate anyone 'else' adding code to the move and jump methods. An easy update.

Also, stack-error preventative code has been added to Game_Map and Game_Player to what I now have
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply }


Messages In This Thread
Fog of War - by Tepe - 11-05-2024, 12:42 AM
RE: Fog of War - by DerVVulfman - 11-05-2024, 05:06 PM
RE: Fog of War - by DerVVulfman - 11-05-2024, 06:15 PM
RE: Fog of War - by Tepe - 11-06-2024, 04:11 AM
RE: Fog of War - by Tepe - 11-06-2024, 02:49 PM
RE: Fog of War - by DerVVulfman - 11-09-2024, 08:21 PM
RE: Fog of War - by DerVVulfman - 11-12-2024, 01:13 AM
RE: Fog of War - by Tepe - 11-12-2024, 04:54 PM
RE: Fog of War - by DerVVulfman - 11-12-2024, 05:10 PM
RE: Fog of War - by Tepe - 11-12-2024, 05:58 PM
RE: Fog of War - by DerVVulfman - 11-12-2024, 08:58 PM
RE: Fog of War - by Tepe - 11-12-2024, 09:53 PM
RE: Fog of War - by DerVVulfman - 11-13-2024, 04:02 AM
RE: Fog of War - by Tepe - 11-14-2024, 01:27 AM
RE: Fog of War - by DerVVulfman - 11-14-2024, 02:19 AM
RE: Fog of War - by Tepe - 11-14-2024, 02:29 AM
RE: Fog of War - by DerVVulfman - Today, 01:57 AM
RE: Fog of War - by Tepe - 8 hours ago
RE: Fog of War - by DerVVulfman - 5 hours ago
RE: Fog of War - by Tepe - 2 hours ago



Users browsing this thread: 5 Guest(s)