• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
Resource icon

v19 Fixed Sweet Scent v1.0

This resource pertains to version 19 of Pokémon Essentials.
Pokémon Essentials Version
v19.1 ➖
Find def pbsweetscent in the script called Overworld_FieldMoves
Copy the code below and replace all of the method pbsweetscent - everything starting with def pbSweetScent and ending right before HiddenMoveHandlers::CanUseMove.add(:SWEETSCENT,proc { |move,pkmn,showmsg|

pbSweetScent:
Expand Collapse Copy
def pbSweetScent
  #if $game_screen.weather_type != :None
  #  pbMessage(_INTL("The sweet scent faded for some reason..."))
  #  return
  #end
 
  #play the se for sweet scent
  pbSEPlay("Anim/Sweet Scent")
 
  viewport = Viewport.new(0,0,Graphics.width,Graphics.height)
  viewport.z = 999999
  count = 0
  viewport.color.red   = 255
  viewport.color.green = 105
  viewport.color.blue  = 180
  #was alphaDiff = 12 * 20 / Graphics.frame_rate
  #changed from 12 to 4 to slow down the animation
  alphaDiff = 4 * 20 / Graphics.frame_rate
  loop do
    if count==0 && viewport.color.alpha<128
      viewport.color.alpha += alphaDiff
    elsif count>Graphics.frame_rate/4
      viewport.color.alpha -= alphaDiff
      break if viewport.color.alpha<=0
    else
      count += 1
    end
    Graphics.update
    Input.update
    pbUpdateSceneMap

   
   
   
  end
  viewport.dispose
  enctype = $PokemonEncounters.encounter_type
  if !enctype || !$PokemonEncounters.encounter_possible_here? ||
     !pbEncounter(enctype)
    pbMessage(_INTL("There appears to be nothing here..."))
  end
end
Credits
Maruno (for essentials v19.1)
Gardenette (for fixing sweet scent)
  • Like
Reactions: TechSkylander1518
Author
Gardenette
Views
884
First release
Last update

Ratings

0.00 star(s) 0 ratings

More resources from Gardenette

Back
Top