I can't thank you enough. 😀 Seriously, this is an excellent script. I can't believe I wasn't aware of it until a couple of days ago.
Quasi Movement
RGSS3 Scripts (RMVX Ace)Sorry, I have another bug to report. 😛 When you make an event or the player jump, the sprite jumps correctly, but the collision box remains where it initially was. I'm assuming "def update_jump" is the method that is malfunctioning?
Think I may have fixed it! I had a slightly different bug where the event would move back to its previous location after the jump, but jumping seems to be working as it should now. Also noticed I left jump to be grid based, is that fine or should I change it to pixel based / add in a pixel based jump?
You have to update both Movement and Optimize (the events grid wasn't being updated after the jump so his collision box didn't work after the jump)
Movement
Optimize
I pulled these straight out of my test project so hopefully they are stable and I wasn't in the middle of modifying anything xD. Optimize was slightly rewritten to run better.
Also thinking of splitting the Region Pixel off of the collision map, and have it so you can import 2 maps, the collision map and a region map. That way you can mark some regions over impassable tiles. Ex: marking pixel regions on water.
You have to update both Movement and Optimize (the events grid wasn't being updated after the jump so his collision box didn't work after the jump)
Movement
Optimize
I pulled these straight out of my test project so hopefully they are stable and I wasn't in the middle of modifying anything xD. Optimize was slightly rewritten to run better.
Also thinking of splitting the Region Pixel off of the collision map, and have it so you can import 2 maps, the collision map and a region map. That way you can mark some regions over impassable tiles. Ex: marking pixel regions on water.
Works great now! Thanks!
I can think of a few possible uses for a pixel-based jump, but I don't plan on using it in the near future, no. I'm happy with grid-based jumps. Maybe other people would find it useful.
Also, this is more of a question than a fix request, but have you noticed $game_player.moving? always returns false when you use this script, even when the player is in fact moving? I noticed this because Source's Enhanced Camera script, when used alongside Quasi Movement, completely stops the screen from scrolling when the player moves. I narrowed the problem down to this bit of code:
def update_scroll(last_real_x, last_real_y) # Check if Enhanced Camera is active. if $game_map.ms_ecam_str > 1 # Check if it is good to go. unless $game_map.ms_ecam_target || $game_map.ms_ecam_iterations || $game_map.ms_ecam_ignore_player || !moving? # Updates the camera centering. $game_map.ms_ecam_center(@real_x, @real_y) end else # Not active? Then default method only. ms_ecam_original_update_scroll(last_real_x, last_real_y) end endMore specifically, "!moving?" always returns true, so this line is never run: $game_map.ms_ecam_center(@real_x, @real_y)
If I simply comment that one condition out, things work without problems - the only issue I can think of is that the line would be run unnecessarily when the player isn't actually moving. But I'm still asking because there are a lot of cool things we can do with that method. For example, when an NPC enters a room, we might want the player to stand still to remain undetected. We can check this using $game_player.moving?
I can think of a few possible uses for a pixel-based jump, but I don't plan on using it in the near future, no. I'm happy with grid-based jumps. Maybe other people would find it useful.
Also, this is more of a question than a fix request, but have you noticed $game_player.moving? always returns false when you use this script, even when the player is in fact moving? I noticed this because Source's Enhanced Camera script, when used alongside Quasi Movement, completely stops the screen from scrolling when the player moves. I narrowed the problem down to this bit of code:
def update_scroll(last_real_x, last_real_y) # Check if Enhanced Camera is active. if $game_map.ms_ecam_str > 1 # Check if it is good to go. unless $game_map.ms_ecam_target || $game_map.ms_ecam_iterations || $game_map.ms_ecam_ignore_player || !moving? # Updates the camera centering. $game_map.ms_ecam_center(@real_x, @real_y) end else # Not active? Then default method only. ms_ecam_original_update_scroll(last_real_x, last_real_y) end endMore specifically, "!moving?" always returns true, so this line is never run: $game_map.ms_ecam_center(@real_x, @real_y)
If I simply comment that one condition out, things work without problems - the only issue I can think of is that the line would be run unnecessarily when the player isn't actually moving. But I'm still asking because there are a lot of cool things we can do with that method. For example, when an NPC enters a room, we might want the player to stand still to remain undetected. We can check this using $game_player.moving?
That is odd. Not sure why it's doing that lol everything looks fine.
One possible way I can think of to go around that is to add in a
attr_reader :stop_countin Game_CharacterBase
and instead of doing $game_player.moving? use
$game_player.stop_count > 0I tested that the player and seemed to be working, not sure if same applies for events.
One possible way I can think of to go around that is to add in a
attr_reader :stop_countin Game_CharacterBase
and instead of doing $game_player.moving? use
$game_player.stop_count > 0I tested that the player and seemed to be working, not sure if same applies for events.
It does work. 😀 Perfect. I know I've said this a bunch of times, but I really appreciate the help.
OK, I hate to bug you yet again, but do you have any updates on the follower issue? I saw other people had reported the diagonal movement problem that makes followers lag behind, but I hadn't tested it myself until now.
Yeah I had fixed that a while back, but I also haven't been testing it through all the recent changes. I just tested it and seems to be working fine for me, except their movements in 32 grid looks a bit funky lol.
Ah, I've just now realized what the problem is. When you set DIAGSPEED = 0, followers don't lag behind. I was using -0.3 to compensate the faster diagonal movement, but apparently it makes followers slower than the player.
Oh yeh that definitely sounds like a bug. I'll look into it! Hopefully I'll have time to put up the updated version by this weekend.
On a new map the player can venture out into the default 'blank' tiles. As I sometimes tend to use parallax mapping, using the default 'blank' tile as a boundary, this is a Bad Thing. I am assuming this is because the 'blank' tile is not listed in the 'TILEBOXES' constant. Is it possible to add in another debug option or perhaps just a scriptlet to find the TileID for certain tiles so they can be entered manually?
OK I have this very weird issue going on. At the start of my game I am requiring the player to go to a dresser and activate it there by changing the character's sprite But as I noticed when the character goes over to the dresser and the action button is pressed, nothing happens. Why?
I set the movement to be by pixel instead of the standard 32px grid.
I set the movement to be by pixel instead of the standard 32px grid.
StarWarrior, have you followed the instructions in the original post regarding setting collision boxes for your tiles and events?
It sounds like you haven't set your collision boxes. If that is the case, that is exactly what you have to do. Please refer to the original posts for the full instructions.
It sounds like you haven't set your collision boxes. If that is the case, that is exactly what you have to do. Please refer to the original posts for the full instructions.
Would you happen to be referring to this?
I don't get how its supposed to work. can someone explain to me? I saw the example. Put the tag in a comment in inside the event. Got it. But that's all I understand.
Event bounding boxes are automatically set. You can use <bbox=width,height,ox,oy> if you don't want to use the default bounding box for events. So I doubt that's the problem.
My guess is that you've placed your event inside an impassable area. For example, my doors can't be triggered when I place them on walls, so I either have to make that part of the wall passable or make the event slightly bigger so a couple of pixels are sticking out of the wall.
My guess is that you've placed your event inside an impassable area. For example, my doors can't be triggered when I place them on walls, so I either have to make that part of the wall passable or make the event slightly bigger so a couple of pixels are sticking out of the wall.
It was an educated guess, but still a guess.
Is the bottom of the dresser really a passable tile when the event isn't there, though? I don't mean to sound condescending, but it really doesn't look like it is, unless you've specifically changed the tile passability. If that tile is in fact passable, could you maybe make a demo so I could take a look?
Is the bottom of the dresser really a passable tile when the event isn't there, though? I don't mean to sound condescending, but it really doesn't look like it is, unless you've specifically changed the tile passability. If that tile is in fact passable, could you maybe make a demo so I could take a look?
Oh you mean the dresser itself? No, that is not passable. Its not meant to be passable.
when I switched back to the 32 grid movement. the event worked as normal.
@Exhydra
Sure I'll add a function to be able to grab the TileID so you can input them manually if needed. Also for parallax mapping, I figured people would make collision maps which just makes setting up the collisions tons easier.
@StarWarrior
There's a little extra info on boxes on my site. link
If you don't understand a specific part, let me know which part so I can explain.
I'll look into that bug? which I think it might be what Rairun is talking about, but if you can a small demo of that map would help.
So events can't be triggered when placed over impassable tiles? I should probably fix that too then lol.
Sure I'll add a function to be able to grab the TileID so you can input them manually if needed. Also for parallax mapping, I figured people would make collision maps which just makes setting up the collisions tons easier.
@StarWarrior
There's a little extra info on boxes on my site. link
If you don't understand a specific part, let me know which part so I can explain.
I'll look into that bug? which I think it might be what Rairun is talking about, but if you can a small demo of that map would help.
So events can't be triggered when placed over impassable tiles? I should probably fix that too then lol.
I think THAT might be the problem I am experiencing right there.
Original thread: https://forums.rpgmakerweb.com/threads/quasi-movement.34088/
