Orange Movement 3

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,545
Reaction score
3,716
First Language
Java's Crypt
Primarily Uses
RMMZ
Thanks Hudell, that would be great to disable and enable at will. Hopefully it is an easy addition. When i have more then one party member the other member/followers stays idle and do not move, i am not sure if i am missing something with the script. I thought it may of been other scripts i've been using and tried it in a fresh default project and still have the same thing happening. Appreciate your quick response. Thanks
Right, sorry for that. It's fixed now.

I also changed it so you can enable / disable the whole script with a switch, just modify this line:

Enabled = true
changing "true" for the ID of the switch that will control if the script is enabled or not.
 
Joined
Sep 22, 2013
Messages
23
Reaction score
6
First Language
english
Primarily Uses
Sweet! You rock Hudell. Thanks man, super fast. Works great, follower movement is different then default, probably due to the changes in movement with the script but works great either way, especially for the type of game i am working on. Thanks alot i really appreciate it. Keep up the great work! If you ever need any extra help with testing etc or anything i would be happy to return the favor. Cheers
 
Last edited by a moderator:

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,545
Reaction score
3,716
First Language
Java's Crypt
Primarily Uses
RMMZ
I hadn't noticed before how weird the followers were moving, I've updated the script now to make it better.

If I were to implement hitboxes, how would you people prefer to configure those hitboxes?
 
Last edited by a moderator:

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,545
Reaction score
3,716
First Language
Java's Crypt
Primarily Uses
RMMZ
Big update on the script, now on version 2.0:

* I remade the way that collisions are checked, now it is easier to expand and add new options.

* I added a way to configure the player hitbox. You can now have larger os smaller sprites moving around triggering the right events and collisions.

* Added a new setting to configure if the script should trigger ALL available events or only the first if finds. For example: if the player steps on two events that are triggered by touch, you can now decide if the script should trigger both or only one.

I'll soon prepare a demo showing all features.
 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
5,624
Reaction score
5,107
First Language
English
Primarily Uses
RMVXA
Whoa, I neglected this topic for a couple weeks only to come back and find a lot of cool new features!  Very nice!

Gonna try this script out soon and see if I can replace my current pixel movement scripts with it.  It certainly looks like the best one I've seen yet.
 

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,545
Reaction score
3,716
First Language
Java's Crypt
Primarily Uses
RMMZ
I updated the script again, adding a new setting: Block_Repeated_Event_Triggering

Activated by default, this setting will block an on touch event from running again after every step the player takes. The events will only be triggered a second time if you exit the tile and then step on it again.

If you use Effectus Performance Enhancer, you'll need this compatibility patch to enable this setting:

https://github.com/Hudell/scripts/blob/master/standalone/movement/compatibility/effectus.rb

If you disable the new setting, the patch is not necessary.
 
Last edited by a moderator:

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,545
Reaction score
3,716
First Language
Java's Crypt
Primarily Uses
RMMZ
There was an update on the script today, fixing a small issue with the auto jump feature. If you don't use it, there's no need to update.
 

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,545
Reaction score
3,716
First Language
Java's Crypt
Primarily Uses
RMMZ
Script updated to version 2.5.

I've added the capacity to configure a different hitbox for each actor. You can now have characters with different sizes colliding properly.

To configure the hitbox of an actor, add those values to the actor notes on the database:

orange_hitbox_x=0orange_hitbox_y=0orange_hitbox_w=32orange_hitbox_h=32
The first two param will "move" the top left position of the hitbox. The last two will change it's size.

Example: Say you have a character that is 40px wide and you want to configure it's hitbox so that it will be 40px wide too. You can use those values:

orange_hitbox_x=-4orange_hitbox_w=40
This way, the hitbox will start 4px to the left of where it otherwise would, and it will have a width of 40px (ending 4px to the right of where it would without the script)
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
822
First Language
Hungarian
Primarily Uses
RMVXA
Cool script! Gonna test it today.


The github effectus patch says we don't need the patch anymore. So, I should not install that one, right?
 

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,545
Reaction score
3,716
First Language
Java's Crypt
Primarily Uses
RMMZ
Cool script! Gonna test it today.

The github effectus patch says we don't need the patch anymore. So, I should not install that one, right?
Yup, one of the latest effectus updates solved the compatibility issue I had with it before.
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
822
First Language
Hungarian
Primarily Uses
RMVXA
Currently testing, working fine so far!


But you forgot to add your module name before the constant names in the Game_Actor class, so it gives an instant error if you don't set a custom hit-box size for your actors.


Also you can already read the @note variable from RPG::Actor, since it got it's reader AND writer function defined with 'attr_accessor' (inherited from RPG::BaseItem) already.


You can simply delete those lines from your script, those are not needed.


So far, so good! I like this script, almost plug-and-play! :D


Now I wonder if it can operate without issues if I use only parallax mapping and use a picture collision system... I bet that will cause issues, but it never hurts to try...
 

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,545
Reaction score
3,716
First Language
Java's Crypt
Primarily Uses
RMMZ
Currently testing, working fine so far!

But you forgot to add your module name before the constant names in the Game_Actor class, so it gives an instant error if you don't set a custom hit-box size for your actors.

Also you can already read the @note variable from RPG::Actor, since it got it's reader AND writer function defined with 'attr_accessor' (inherited from RPG::BaseItem) already.

You can simply delete those lines from your script, those are not needed.

So far, so good! I like this script, almost plug-and-play! :D

Now I wonder if it can operate without issues if I use only parallax mapping and use a picture collision system... I bet that will cause issues, but it never hurts to try...
Yup, I noticed the missing module yesterday. It's fixed on the github already.

The note reader was there because I got an error while developing and I thought it was missing a reader, then I forgot to remove it when I noticed it was something else.

If you want to use only parallax mapping, you can use regions to configure the collisions (see the settings Map_Always_Passable_Region and Map_Never_Passable_Region, they both have a higher priority than the tileset configuration).

But if you need collision by pixel... I haven't done anything like that because I couldn't think of any easy way to configure it.

And thanks for the feedback :)
 
Last edited by a moderator:

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,545
Reaction score
3,716
First Language
Java's Crypt
Primarily Uses
RMMZ
I've updated the script again. You can configure a different sprite to be shown when the actor is running, adding this to the actor notes on the database:

walking_sprite_name=Actor1walking_sprite_index=0dashing_sprite_name=Actor2dashing_sprite_index=0You can also change those settings with a script call:

$game_actors[1].dashing_sprite_name = 'Actor20'$game_actors[1].dashing_sprite_index = 5$game_actors[1].walking_sprite_name = 'Actor19'$game_actors[1].walking_sprite_index = 6Just replace the number 1 by the ID of the actor you want to change.
 
Last edited by a moderator:

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
5,624
Reaction score
5,107
First Language
English
Primarily Uses
RMVXA
Played around with this script for about an hour in the Action Battle System project I was making a while back, and I'm really impressed with the quality of Orange Movement.

Here's why it's a better script than Viktor Sant's Pixel Movement:

  • Runs much smoother (average of about 59 FPS for Orange, 54 FPS for Pixel) and with seemingly less jitter
  • Events won't get stuck in other events
  • Can't accidentally trigger two Action Button events at once
  • Less hang-ups with adjusting character movement speed
  • Cleaner, more compact, and generally more compatible code
  • Much nicer creator :)
I was actually (very pleasantly) surprised that I couldn't get myself "stuck" in other events with transfer player functions, etc. - maybe this is due to your auto-avoid functions?

There are a couple of "bugs" that I found in the system.  First of all, the system for determining which event should be triggered if you're adjacent to two or more events seems to place a large bias on one of them (perhaps the one with the lowest ID or the one that's farthest left).  See attached screenshot with two touch events: I'm almost entirely behind Event #2, but Event #1 triggers anyway.

Orange Movement 1.png

Secondly, enemies were able to knock me into walls and get me stuck in the wall.  I'm not 100% sure but I think this is a behavior of your script rather than anything exotic I was doing.  There's a lot going on in my project but I checked the Knockback event and it's just simple forced movement while Direction Fix is On.  See attached screenshot where I'm a few pixels into the wall and simply cannot move.

Orange Movement 2.png

A couple other recommendations: It looks like there's no way to set event hitboxes; only player hitboxes.  I know you said you didn't miss them, but (unless I'm forgetting something) this makes it impossible to interact with (or be impeded by) most of a large event's model.  If there's a 5x5 tile dragon or giant tree that I want to talk to, I'd have to line up with that tiny 32x32 pixel box at the bottom-center in order to get it to turn my way and interact with me, right?

Additionally, you have some setup that is not explained well - I can see by scanning your script that the designer can set notetags on actors to change their hitboxes, dashing sprites, etc., but most users will have no idea what notetags to use, what syntax is required, or what graphic files, if any, need to be modified.  I recommend adding some documentation so non-coders will know how to use all of the tools you worked so hard to create.

Haven't gotten to try most of your features and options yet, as this was just a trial run to see if it would work with my game (the answer is a resounding yes), but a lot of them look very cool and I'm looking forward to playing with auto-avoid and falling.

Thanks for your fantastic script!  Looking forward to playing with it more when I get a chance, and to seeing more of your stuff! :)
 

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,545
Reaction score
3,716
First Language
Java's Crypt
Primarily Uses
RMMZ
Much nicer creator :)
 
:blush:

I was actually (very pleasantly) surprised that I couldn't get myself "stuck" in other events with transfer player functions, etc. - maybe this is due to your auto-avoid functions?
Nope, check the comment on line 515.

There are a couple of "bugs" that I found in the system.  First of all, the system for determining which event should be triggered if you're adjacent to two or more events seems to place a large bias on one of them (perhaps the one with the lowest ID or the one that's farthest left).  See attached screenshot with two touch events: I'm almost entirely behind Event #2, but Event #1 triggers anyway.
 
Yeah, I have seen this happen quite often. One thing I did was to disconsider any events that has no command, so it won't try to trigger an empty event instead of an useful one. I will need to do some bigger changes to be able to choose which event to trigger, because it currently triggers the first one it finds.

Secondly, enemies were able to knock me into walls and get me stuck in the wall.  I'm not 100% sure but I think this is a behavior of your script rather than anything exotic I was doing.  There's a lot going on in my project but I checked the Knockback event and it's just simple forced movement while Direction Fix is On.  See attached screenshot where I'm a few pixels into the wall and simply cannot move.
 
I'll check this tonight, it's probably simple to fix.


Edit: Fixed.

A couple other recommendations: It looks like there's no way to set event hitboxes; only player hitboxes.  I know you said you didn't miss them, but (unless I'm forgetting something) this makes it impossible to interact with (or be impeded by) most of a large event's model.  If there's a 5x5 tile dragon or giant tree that I want to talk to, I'd have to line up with that tiny 32x32 pixel box at the bottom-center in order to get it to turn my way and interact with me, right?
 
Currently, yes. But I want to implement event hitboxes for my IGMC entry, so it should be available next week. I should've done this long ago, but it's be a very big change. Would it be "good enough" if you could set an event to block more tiles?

Additionally, you have some setup that is not explained well - I can see by scanning your script that the designer can set notetags on actors to change their hitboxes, dashing sprites, etc., but most users will have no idea what notetags to use, what syntax is required, or what graphic files, if any, need to be modified.  I recommend adding some documentation so non-coders will know how to use all of the tools you worked so hard to create.
 
You are right, I only described the notetags here on the thread.


Edit: I described it on the script now.

Haven't gotten to try most of your features and options yet, as this was just a trial run to see if it would work with my game (the answer is a resounding yes), but a lot of them look very cool and I'm looking forward to playing with auto-avoid and falling.


Thanks for your fantastic script!  Looking forward to playing with it more when I get a chance, and to seeing more of your stuff! :)
Thank you for the feedback. Let me know if you need any other feature on it.
 
Last edited by a moderator:

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,545
Reaction score
3,716
First Language
Java's Crypt
Primarily Uses
RMMZ
I did a very basic implementation of event hitboxes, here:

https://github.com/Hudell/scripts/blob/master/standalone/event_hitboxes/event_hitboxes.rb

This is a separate script and it should work with or without the orange movement script.

It lets you configure different sizes and positions for the event hitboxes, in number of tiles.

The default hitbox is x=0,y=0, width=1, height=1

If you want to use an event that has double height, you add a comment on it with those configurations:

Code:
hitbox_y=-1hitbox_height=2
 

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,545
Reaction score
3,716
First Language
Java's Crypt
Primarily Uses
RMMZ
I've included the event hitboxes on the main script and improved it greatly.


You can configure it the same way as before.
 

MakoTorii

Veteran
Veteran
Joined
May 9, 2013
Messages
58
Reaction score
9
First Language
English
Primarily Uses
Hello. I'm trying to use this script, but I get this error when I start the game up.



I'm guessing this is due to my game starting up not on the default title screen or the usual title screens through scripts at all, to be exact. I use eventing to create a title menu on a map with the help of a skip title screen script to avoid the title screen built-in. I'm using JV Master's Skip Title script. So the game starts up on a map from the start which loads events that makes up the event-made title screen.

Code:
#==============================================================================# Skip Title Screen                                           JV Master Script#------------------------------------------------------------------------------# Skip Title Screen, going to first game map.#==============================================================================#==============================================================================# Scene Title#==============================================================================class Scene_Title < Scene_Base  def start    SceneManager.clear    Graphics.freeze    DataManager.setup_new_game    $game_map.autoplay    SceneManager.goto(Scene_Map)  end    def terminate    SceneManager.snapshot_for_background    Graphics.fadeout(Graphics.frame_rate)  endend#==============================================================================
 

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,545
Reaction score
3,716
First Language
Java's Crypt
Primarily Uses
RMMZ
Ah, sorry, it was a bug on the script (I added a compatibility patch with Effectus a few days ago and forgot to test it without that script).


It's fixed now.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

I should realize that error was produced by a outdated version of MZ so that's why it pop up like that
Ami
i can't wait to drink some ice after struggling with my illness in 9 days. 9 days is really bad for me,i can't focus with my shop and even can't do something with my project
How many hours have you got in mz so far?

A bit of a "sparkle" update to the lower portion of the world map. :LZSexcite:
attack on titan final season is airing tomorrow, I'm excited and scared at the same time!

Forum statistics

Threads
105,881
Messages
1,017,227
Members
137,607
Latest member
Maddo
Top