[RESOLVED]Vertically Screen Shaking: Pictures aren't fixed onto map

Started by Stray, February 19, 2013, 06:53:59 pm

Previous topic - Next topic

Stray

Pictures aren't fixed while shaking on the map with this script. How can I change this?
Vertically Shaking Screen Script: ShowHide

Code: ruby

#by Shining Advances

class Game_Screen
 attr_accessor :vertikal
end
class Spriteset_Map
 alias shake_update update
 def update
   shake_update
   if $game_screen.vertikal == true
     @viewport1.oy = $game_screen.shake
     @viewport1.ox = 0
   else
     @viewport1.ox = $game_screen.shake
     @viewport1.oy = 0
   end
 end
end


I have nearly no experience in scripting, but I guess it's a small problem.
I'm very grateful to you all for your great help.

Ryex

it's because the pictures arn't in the same viewport as the map spriteset, here this should do it.

Code: ruby

#by Shining Advances

class Game_Screen
 attr_accessor :vertikal
end
class Spriteset_Map
 alias shake_update update
 def update
   shake_update
   if $game_screen.vertikal == true
     @viewport1.oy = @viewport2.oy = $game_screen.shake
     @viewport1.ox = @viewport2.ox = 0
   else
     @viewport1.ox = @viewport2.ox = $game_screen.shake
     @viewport1.oy = @viewport2.oy = 0
   end
 end
end
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Stray

Thank you; now my picture-animated cutscenes look way better. :]
I'm very grateful to you all for your great help.