Help - Search - Members - Calendar
Full Version: Tinting the screen but not the player
RPG RPG Revolution Forums > Game Engines > RPG Maker VX Discussion
lilcooldude69
yeh i wanna tint the screen but i dont want the player to be tinted is that possible at all? if it is with events i missed somthing and if it is with scripts can one of you guys script me somthing like that biggrin.gif?
Kread-EX
Go to the Spriteset_Map script section. And find this:
CODE
  def create_characters
    @character_sprites = []
    for i in $game_map.events.keys.sort
      sprite = Sprite_Character.new(@viewport1, $game_map.events[i])
      @character_sprites.push(sprite)
    end
    for vehicle in $game_map.vehicles
      sprite = Sprite_Character.new(@viewport1, vehicle)
      @character_sprites.push(sprite)
    end
    @character_sprites.push(Sprite_Character.new(@viewport1, $game_player))
  end

Replace all the @viewport1 occurences by @viewport2 or @viewport3. This method will not tint events.
If you want events to be tinted but not the player, change only the third one.
lilcooldude69
ok cool is there a way i can do call script so i can activate it only when needed? like $game_player = @viewpoint2 or sumthing? if not then i'll just stick with what i have
Kread-EX
No, because the sprites are loaded with the map, so the viewport can only be set upon entering a map. You can use a switch to control it, like this:
CODE
  def create_characters
    @character_sprites = []
    for i in $game_map.events.keys.sort
      sprite = Sprite_Character.new(@viewport1, $game_map.events[i])
      @character_sprites.push(sprite)
    end
    for vehicle in $game_map.vehicles
      sprite = Sprite_Character.new(@viewport1, vehicle)
      @character_sprites.push(sprite)
    end
    #### The control switch is set here
    # Replace 56 by the real switch ID
    vp = $game_switches[56] ? @viewport2 : @viewport1
    @character_sprites.push(Sprite_Character.new(vp, $game_player))
  end

In this example, the player will be excluded only if the 56th switch is ON. But then again, the effect only takes place if you transfer to another map.
lilcooldude69
okay i'll just stick with the last one lol thanx for the info Tho biggrin.gif ur a big help kread
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.