Pixelmovement Script: v1.52 released!

Hi..

bojjenclon: normally it should work.. which things did you disable and what didnt work then?

ezequiel: I'll check this.. ^^

CapnMuffin: Well.. yeah the slide lags sometimes (especially on slower computers), this is because sliding at corners is very difficult.. the script has to check every pixel wether there is a real corner where the player can slide around or there only is a small edge.. If you would slide on such an edge, the player would get stuck..
I'll check the player touch thing too.. but are you sure, this doenst happen without the script?

btw.. after this week I'll have some weeks of free time and I will try to eliminate all those bugs then.. (;
hi! your script is AWESOME!!!the colision map idea is incredible...

and yes, ive made an account just to report you some bugs :P

first, somebody already told you of a bug when the event dont start when on a impassible tile... PLEASE fix it cause its one of the only thing that keep me from using it.

second, when you FINNALY activated the event (by resising and with chance) you need to move away and come back to reactivate it.

thank you and hope you fix those bugs :P

PS: can you make a switch to deactivate pixel movement for event? my zelda fairy dont seem to look good with this script^^
I've just noticed how close you can get with your character to an event, the player is practically over it! I've tried looking in the scripts but couldn't find the right area to edit.
MysticTrunks wrote:
I've just noticed how close you can get with your character to an event, the player is practically over it! I've tried looking in the scripts but couldn't find the right area to edit.


Read documentation - you can set events width & height
Huh, guess that was the Player_size variable. My bad.. But hey it fixed my problem.
Hi! First of all, i want to thank you for this incredible script.
And i have some questions:
The command $pixelmovement.player_shift_x only modify the player sprite, right? So i want to know how to modify the player position itself, to put it on the center of the screen. The player position is not in the center of the screen, why you changed it? It´s on up-left of the screen (-16x,-30y i think).

How can i use this command: on_event?(event, sx = @x, sy = @y, ex = event.x, ey = event.y , w_add = 0, h_add = 0)
I have to change the characters for numbers? And what means every character?

I´m having trouble using this command too: in_rect?(center_x, center_y, height, width)
The "center_x" and "center_y" means really the center of the rectangle? I´m testing it with a picture with the same size and its not working...

Thank you!
Hi there ^.^
i've a little question... i've notice a really Big Bug into this project o_o
i'ìm not pretty sure if it's already been segnalized or not... but, the problem is this:
"I can't save"
if you save the game... the script will take error at PathFinding... and in the class Game_Map...
like this no one can use this script >_< how can you use a script that give you such an error?
Could someone tell me if already exist a solution for this problem?
Thanks a bunch ppl... cause this script is a must for the project i've in mind...

EDIT: I'm using the last version... whitout any change (for now U.U)
i haven't touch it a bit...
I've a problem with the light version.
I put the pixelmovement script above Main into new project ( create in the project folder the "Pixelmovement tables" folder ).
Now the player moves 8dir and with the pixelmov, but if i put an event with a simple "show text" and Action Button trigger, it gives me this error as soon as I try to trigger the event:
Image

  1.  #-----------------------------------------------------------------------------
  2. # returns direction in which the event[id] lies
  3. #-----------------------------------------------------------------------------
  4.   def direction_to(id)
  5.     dir = @direction
  6.     stop = @stop_count
  7.     dir_fix = @direction_fix
  8.     @direction_fix = false
  9.     self.turn_toward_event(id, false)
  10.     result = @old_direction
  11.     @direction = dir
  12.     @stop_count = stop
  13.     @direction_fix = dir_fix
  14.     return result
  15.   end
  16.  
Expand to see the code.


with line 1987 being this one:
  1. self.turn_toward_event(id, false)
Expand to see the code.
Excuse this bump, because I think I have solved the problem many people are having with the 'light' version of this script.

Search for:
"# Activation: Push Key, not Passable"

Replace the code between "normal" and "counter top" with the following:
  1.    result = false
  2.     return result if $game_system.map_interpreter.running?
  3.  
  4.     for event in $game_map.events.values
  5.       if !event.jumping? and !event.over_trigger? and
  6.       triggers.include?(event.trigger) and !self.looks_at?(event.id) and
  7.       self.in_rect?(event.real_x / 4, event.real_y / 4 - event.size['y'] / 2 +
  8.       @size['y'] / 2, event.size['x'] + @size['x'] + 8, event.size['y'] +
  9.       @size['y'] + 8, @real_x / 4, @real_y / 4)
  10.      
  11.         event.trigger_on = true
  12.         event.start
  13.         result = true
  14.       end
  15.            
  16.     end
Expand to see the code.


Go down a little way to find
"# Activation: Touch, not Passable "

Replace th definition with:
  1.  def check_event_trigger_touch(x, y)
  2.    
  3.     result = false
  4.     return result if $game_system.map_interpreter.running?
  5.  
  6.     for event in $game_map.events.values
  7.       if [1, 2].include?(event.trigger) and !event.jumping? and
  8.       !event.over_trigger? and !event.trigger_on and
  9.       self.in_rect?(event.real_x / 4, event.real_y / 4 - event.size['y'] / 2 +
  10.       @size['y'] / 2, event.size['x'] + @size['x'] + 8, event.size['y'] +
  11.       @size['y'] + 8, @real_x / 4, @real_y / 4)
  12.  
  13.         event.trigger_on = true
  14.         event.start
  15.         result = true
  16.       end
  17.      
  18.     end
  19.    
  20.     return result
  21.   end
Expand to see the code.


And for the common error message, just remove the "false" from "self.turn_toward_event(id, false)"...

This seems to fix things for me, in fact, I'm wondering if any
" if [1, 2].include?(event.trigger) and not event.jumping? and
not event.over_trigger? and not event.trigger_on and
"
block (or similar code, it's in each event activation check) is causing the problem where events don't register? Replacing 'not' with '!' seems to fix things.

But there's no reason why it should. The same use of 'not' works in the full version demo! D:
Hi. I love this script and I would like to use it as well.

I decided to use the Light version which is pretty awesome for me.

I only have a little problem. I want to be able to make my charset bigger and smaller and I had a script to do this, but I can't use it with Piyelmovement.

Can somebody help me?

Here is my sizer script:

  1.  
  2. class Game_Character  
  3.   alias_method :ark_sizing_game_character_initialize, :initialize  
  4.   attr_accessor :zoom_x
  5.   attr_accessor :zoom_y  
  6.   def initialize    
  7.     ark_sizing_game_character_initialize    
  8.     @zoom_x = @zoom_y = 1.0  
  9.   end
  10.   def resize(zoom_x, zoom_y)    
  11.     @zoom_x, @zoom_y = zoom_x, zoom_y  
  12.   end
  13. end
  14. class Sprite_Character < RPG::Sprite  
  15.   alias_method :ark_sizing_sprite_character_update, :update  
  16.   def update    
  17.     ark_sizing_sprite_character_update    
  18.     self.zoom_x, self.zoom_y = @character.zoom_x, @character.zoom_y  
  19.   end
  20. end
  21.  
Expand to see the code.
Hey fotz! I've been working with a modified version of your script, so I fully expect you won't be able to help me but I ask because you probably know more of what's going on than I do.

I've been working on a looped map for so long that after integrating Pixelmovement, I go to a non-looped map and the game freezes if I move down or right, but not left or up. By "Freeze" I mean no error is raised, including Hangup after 10 seconds. Something is continuing to update graphics, but the character has been teleported halfway across the map and is stuck in place. I can't even bring Scene_Menu up. I will continue to look for the problem, but if you (or anybody else, really) has some insight I would greatly appreciate it.
rey meustrus wrote:
Hey fotz! I've been working with a modified version of your script, so I fully expect you won't be able to help me but I ask because you probably know more of what's going on than I do.

I've been working on a looped map for so long that after integrating Pixelmovement, I go to a non-looped map and the game freezes if I move down or right, but not left or up. By "Freeze" I mean no error is raised, including Hangup after 10 seconds. Something is continuing to update graphics, but the character has been teleported halfway across the map and is stuck in place. I can't even bring Scene_Menu up. I will continue to look for the problem, but if you (or anybody else, really) has some insight I would greatly appreciate it.


Quick fix: Can't you make all maps looped and put some blocking tile at the borders to limit it?
That would be if I wanted it to be wrong. I'm capable of fixing it, so I will. Quick fixes like that are the sort of thing you do when you aren't a scripter, and are just trying to get a mash of scripts working together. If it wasn't important, I wouldn't have asked.

...I guess that's as close as I can get to flaming someone.
rey meustrus wrote:
That would be if I wanted it to be wrong. I'm capable of fixing it, so I will. Quick fixes like that are the sort of thing you do when you aren't a scripter, and are just trying to get a mash of scripts working together. If it wasn't important, I wouldn't have asked.

...I guess that's as close as I can get to flaming someone.


Sorry, dude :blank:
I understand you, though. When I get a bug in something I made, I can't rest until I understand exactly what went wrong (that almost becomes a personal hell whenever I program C :shock: ). Just thought you'd like the simplest working solution, and maybe you hadn't thought of that yet.

Go for it, and tell us all what the problem was when you solve it.
I found my problem. It was in the code for Game_Map.scroll_down and Game_Map.scroll_right. Where it checks if it's scrolling past the edge, there was the wrong comparator for some reason. I'm sure it was my own error.
I'm in USA and the download link appears to be broken...? I highly doubt it because my ISP logo comes up and says it's broken... suspicious heh... but anyway I'd like to use this but I don't know what side-view battle systems work with this.
If someone finds it, I'll put it back in the Scripts forum. Otherwise it sinks to the depths of the abyss... :(
Rey found the script at http://www.rpg-palace.com/mewsterus/Pix ... nt-1.6.zip

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=624