Pixelmovement and Zoom
#1
Hi!

I've got a script which I adore... Well, make it two.

One is the Pixelmovement script by f0tz!baerchen (I use the light version)
And the other one was made for me by a very sweet scripter, and it makes me able to zoom in on the character set and make it bigger or smaller.

I would like you to help me to make these two scripts compatible with each other. Please, it would be a lot of help!

(the error is: 'No implicit conversion to float from nil' and it points to line 17 in this script:)

self.zoom_x, self.zoom_y = @character.zoom_x, @character.zoom_y

Code:
class Game_Character  
  alias_method :ark_sizing_game_character_initialize, :initialize  
  attr_accessor :zoom_x
  attr_accessor :zoom_y  
  def initialize    
    ark_sizing_game_character_initialize    
    @zoom_x = @zoom_y = 1.0  
  end
  def resize(zoom_x, zoom_y)    
    @zoom_x, @zoom_y = zoom_x, zoom_y  
  end
end
class Sprite_Character < RPG::Sprite  
  alias_method :ark_sizing_sprite_character_update, :update  
  def update    
    ark_sizing_sprite_character_update    
    self.zoom_x, self.zoom_y = @character.zoom_x, @character.zoom_y  
  end
end
Reply }
#2
Put it above the pixelmovement script.
Reply }
#3
Thanks. It starts the project now, but I get another error when I want to change the size of my charset using a call script...

The call script:
$game_player.resize(2,2)

And the error says:
Wrong number of arguments (2 for 1)
and it poits to the pixelmovement script with line 1987 which is this:
self.turn_toward_event(id, false)
(it is in: def direction_to(id))

I don't know too much about scripting, but I tried this call script, too:
$game_player.resize(2)
and it gave me the same error.
Does it mean that I have problem with pixelmovement rather than the two scripts?

EDIT:
Okay I experimented a little...
I deleted the sizing script and it gave me the same error. If I put in an event and go and hiit action next to it, it gives me this error. Can you help me what would be the problem with the Light Pixelmovement script?
Reply }
#4
I have no idea. I'm using the same pixelmovement script and it works fine for me.
The problem is not with the resize method, but with the turn_toward_event method.
It could be that some other script is writing over the pixelmovement methods, but I can't really tell much unless I know what scripts are being used and in what order.
Reply }
#5
This is in a clean new project. And I'm using the legal RMXP...

Or could you help me and send me the Scripts.rxdata file of yours?

I can't figure it out what is really the problem...
Reply }
#6
http://www.mediafire.com/?gizygxmygqd

Good luck with that >.>;
Reply }
#7
Thanks for uploading the file, but it doesn't help me. It is filled with your scripts and it always gives me errors that I haven't got files or something...

And in a fresh environment, I copied only the pixelmovement script from your script-base and the character (the player) is stuck in the top left corner of the screen and cannot walk...

EDIT:
Wow, now I found a website which had the lattest version of the script... (1.6, I only had 1.0) and it works now and doesn't crash. But, now the sizer script just doesn't do anything... I try to size the charset and it just doesn't do it...

EDIT 2:
I've uploaded my project...
http://www.2shared.com/file/y6f4v4qf/Project1.html
Reply }
#8
Wierd, cuz the resize option worked just fine for me.
Can you upload the project on a site that doesn't spam me with popups and actually lets me download the thing? Like mediafire?
Reply }
#9
Here is the link:
http://www.mediafire.com/?y2tijwmhzzh

I wanted to upload it to mediafire for the first time, but it was down...
Reply }
#10
Remove this part from the sizing script:
Code:
class Sprite_Character < RPG::Sprite  
  alias_method :ark_sizing_sprite_character_update, :update  
  def update    
    ark_sizing_sprite_character_update    
    self.zoom_x, self.zoom_y = @character.zoom_x, @character.zoom_y  
  end
end
And place it below the pixelmovement script. Leave the other half of the sizing script above the pixelmovement script.
Reply }


Possibly Related Threads…
Thread Author Replies Views Last Post
   ForeverZer0 Custom Resolution + Littledrago's Zoom Solitaire 20 1,254 10-27-2024, 09:32 PM
Last Post: Solitaire
   How would I put the new zoom mode 7? Raphael Rpg Games 2 7,008 07-05-2011, 09:59 PM
Last Post: MGC
   Pixelmovement and speed ark 2 5,675 05-31-2010, 05:51 PM
Last Post: ark



Users browsing this thread: 2 Guest(s)