Author Topic: [XP][VXA] Drago Pixel Movement  (Read 9792 times)

Offline LiTTleDRAgo

  • Astral Trancist
  • *****
  • Posts: 851
  • LV: 517
  • Gender: Male
    • View Profile
    • ~
[XP][VXA] Drago Pixel Movement
« on: May 07, 2013, 05:53:36 PM »
Drago Pixel Movement
Authors: LiTTleDRAgo
Version: 1.02
Type: Movement Add-on
Key Term: Movement Add-on

Introduction

Title explain everything

Features

  • Pixel movement on player

Screenshots



Script

XP Version

VXAce Version

Instructions

Only intended for player movement

Compatibility

Will cause problem with other movement script, especially ABS
Not compatible with Blizz ABS

Credits and Thanks

  • LiTTleDRAgo

Author's Notes

Enjoy ~
« Last Edit: August 12, 2014, 12:05:22 PM by LiTTleDRAgo »

Offline Zexion

  • Addicted to LoL
  • Chaos User
  • ******
  • Posts: 1519
  • LV: 69
  • Gender: Male
  • My anaconda don't...jk it does
    • View Profile
Re: [XP] Drago Pixel Movement
« Reply #1 on: May 07, 2013, 08:10:14 PM »
Thanks drago! I was trying to find a good clean base to look at and see if I could make it work with my script. I haven't actually looked at it yet, but your scripts are always top quality :D

Edit: Just looked at it, and it works without any modification! I'm wondering though if it will effect my event battle system..?
« Last Edit: May 20, 2013, 09:44:31 AM by Zexion »

Offline LiTTleDRAgo

  • Astral Trancist
  • *****
  • Posts: 851
  • LV: 517
  • Gender: Male
    • View Profile
    • ~
Re: [XP][VXA] Drago Pixel Movement
« Reply #2 on: August 12, 2014, 03:25:49 AM »
*slight update, fixes a glitch for passage correction*
*added VXA version*

Offline Soulshaker3

  • Hentaimaster69
  • Transcended Spirit
  • ***
  • Posts: 224
  • LV: 3
  • Gender: Male
  • I'm secsi
    • View Profile
Re: [XP][VXA] Drago Pixel Movement
« Reply #3 on: August 12, 2014, 03:32:47 AM »
Loved the screenshot best idea ever
Hellow?

Offline Zexion

  • Addicted to LoL
  • Chaos User
  • ******
  • Posts: 1519
  • LV: 69
  • Gender: Male
  • My anaconda don't...jk it does
    • View Profile
Re: [XP][VXA] Drago Pixel Movement
« Reply #4 on: August 12, 2014, 07:20:43 AM »
Oh I don't think I ever noticed the bug, but I still use this so I'll update my script. Tis the best one out imo

Offline LiTTleDRAgo

  • Astral Trancist
  • *****
  • Posts: 851
  • LV: 517
  • Gender: Male
    • View Profile
    • ~
Re: [XP][VXA] Drago Pixel Movement
« Reply #5 on: August 12, 2014, 12:05:05 PM »
*update again, added event pixel movement addon*

Offline MetalZelda

  • Awakened Visionist
  • **
  • Posts: 82
  • LV: 1
  • Gender: Male
  • I love you :nohomo:
    • View Profile
Re: [XP][VXA] Drago Pixel Movement
« Reply #6 on: August 14, 2014, 12:07:41 AM »
It causes some problem with XAS, you can go through some impassable tiles ... But it works !

So if I understant this pixel movement, it reduce the 32x32 tile walk by a 16x16 ?

Offline LiTTleDRAgo

  • Astral Trancist
  • *****
  • Posts: 851
  • LV: 517
  • Gender: Male
    • View Profile
    • ~
Re: [XP][VXA] Drago Pixel Movement
« Reply #7 on: August 14, 2014, 04:44:13 AM »
Pixel movement for xas : http://littledrago.blogspot.com/2013/05/rgss-xas-391-ally-system-v112.html

So if I understant this pixel movement, it reduce the 32x32 tile walk by a 16x16 ?

Yes, this script mainly just reduce player step from 1 tile into half (0.5 tile).
« Last Edit: May 16, 2017, 12:27:25 PM by LiTTleDRAgo »

Offline Kise

  • Awakened Visionist
  • **
  • Posts: 61
  • LV: 1
  • Gender: Male
    • View Profile
Re: [XP][VXA] Drago Pixel Movement
« Reply #8 on: June 23, 2017, 01:29:09 PM »
I really like this script, it makes overall movement so much more enjoyable. I'm using also Event PM addon, and I have one problem with it. I have ingame events approaching player with event touch as trigger, and... they get confused when player stands on the edge of a tile. Is there be any way to fix that issue? I thought that adding 'through' option would work, but it didn't.
« Last Edit: June 23, 2017, 02:34:44 PM by Kise »

Offline LiTTleDRAgo

  • Astral Trancist
  • *****
  • Posts: 851
  • LV: 517
  • Gender: Male
    • View Profile
    • ~
Re: [XP][VXA] Drago Pixel Movement
« Reply #9 on: June 23, 2017, 06:09:16 PM »
Try this

Code: [Select]
#==============================================================================
# ** Game_Character
#------------------------------------------------------------------------------
#  This class deals with characters. It's used as a superclass for the
#  Game_Player and Game_Event classes.
#==============================================================================

class Game_Character
  #--------------------------------------------------------------------------
  # * Move toward Player
  #--------------------------------------------------------------------------
  def move_toward_player
    abs_sx = (sx = @x - $game_player.x).abs
    abs_sy = (sy = @y - $game_player.y).abs
    if abs_sx < 1 && abs_sy < 1
      move_away_from_player
      turn_toward_player
    end
    if sx < -0.5 and sy > 0.5
      move_upper_right
    elsif sx > 0.5 and sy > 0.5
      move_upper_left
    elsif sx > 0.5 and sy < -0.5
      move_lower_left
    elsif sx < -0.5 and sy < -0.5
      move_lower_right
    elsif sx < -1.5
      move_right
    elsif sx > 1.5
      move_left
    elsif sy > 1.5
      move_up
    elsif sy < -1.5
      move_down   
    end
  end
end

Offline Kise

  • Awakened Visionist
  • **
  • Posts: 61
  • LV: 1
  • Gender: Male
    • View Profile
Re: [XP][VXA] Drago Pixel Movement
« Reply #10 on: June 23, 2017, 06:56:44 PM »
Unfortunatly that didn't help. One more thing - I noticed, that when player just stands still in a way of 'through event' with on event touch nothing happens (not always). The event is triggered only (mostly) when player moves.
« Last Edit: June 23, 2017, 07:27:21 PM by Kise »

Offline LiTTleDRAgo

  • Astral Trancist
  • *****
  • Posts: 851
  • LV: 517
  • Gender: Male
    • View Profile
    • ~
Re: [XP][VXA] Drago Pixel Movement
« Reply #11 on: June 23, 2017, 09:26:51 PM »
can you send a demo?

Offline Kise

  • Awakened Visionist
  • **
  • Posts: 61
  • LV: 1
  • Gender: Male
    • View Profile
Re: [XP][VXA] Drago Pixel Movement
« Reply #12 on: June 23, 2017, 10:09:13 PM »
Here's demo, two maps show two mentioned issues - http://www13.zippyshare.com/v/dZOO92DU/file.html
« Last Edit: June 24, 2017, 08:28:00 AM by Kise »

Offline LiTTleDRAgo

  • Astral Trancist
  • *****
  • Posts: 851
  • LV: 517
  • Gender: Male
    • View Profile
    • ~
Re: [XP][VXA] Drago Pixel Movement
« Reply #13 on: June 25, 2017, 05:38:36 AM »
Sorry Kise, I'm currently in a remote village without my laptop and rmxp.
I'll be back in a week.

Offline LiTTleDRAgo

  • Astral Trancist
  • *****
  • Posts: 851
  • LV: 517
  • Gender: Male
    • View Profile
    • ~
Re: [XP][VXA] Drago Pixel Movement
« Reply #14 on: June 28, 2017, 03:54:00 PM »
Issue map 1 :

I edited all the trigger coordinates so the event will trigger even if player is in edge of tile.
(click to show/hide)


Issue map 2 :

Don't use Approach, use Custom > Move Toward Player instead.

(click to show/hide)

Offline Kise

  • Awakened Visionist
  • **
  • Posts: 61
  • LV: 1
  • Gender: Male
    • View Profile
Re: [XP][VXA] Drago Pixel Movement
« Reply #15 on: June 28, 2017, 04:58:09 PM »
Thank you, but there's still problem with second solution - events now don't get confused but event touch isn't as responsive. Now sometimes player can just go around it before it triggers.

One more little thing, I'm also using your smooth scroller script and for some reason camera always starts from lower right corner and then centers. It happens at the start of the game, or teleporting player. Oh, and it breaks Scroll Map command.
« Last Edit: June 28, 2017, 07:57:28 PM by Kise »

Offline LiTTleDRAgo

  • Astral Trancist
  • *****
  • Posts: 851
  • LV: 517
  • Gender: Male
    • View Profile
    • ~
Re: [XP][VXA] Drago Pixel Movement
« Reply #16 on: June 29, 2017, 03:43:30 AM »
Hmm... for this problem I think you should thinker a bit with eventing.
As in checking the distance between event and player then make a custom scene / trigger instead relying on rtp's event touch.

Try insert this script.

Code: [Select]
class Game_Character
  #--------------------------------------------------------------------------
  # * adjust_follow_selfswitch
  #--------------------------------------------------------------------------
  def adjust_follow_selfswitch(selfswitch = 'A')
    # Of course other self switch is also okay.
    key = [$game_map.map_id, @id, selfswitch]   
    temp = $game_self_switches[key]
    # Go ahead change this number with whatever distance you need.
    if distance_from($game_player) < 1.75
      # If distance from player is less than 1.75 tile
      $game_self_switches[key] = true
    else
      # If distance from player is more or same than 1.75 tile
      $game_self_switches[key] = false
    end
    if temp != $game_self_switches[key]
      $game_map.need_refresh = true
    end
  end
end


And then you do this :
(click to show/hide)

Now your event self switch will turn on whenever their distance with player is near.
Then, create a new page and do whatever you want in that page.


About smooth scroller script, not sure what your problem are.
Is the camera starts from the very corner right of the map every start / teleported?
I tested it in empty project and there are no such things.
I reuploaded the script and include a switch to activate / deactivate it now.
« Last Edit: June 29, 2017, 03:45:27 AM by LiTTleDRAgo »

Offline Kise

  • Awakened Visionist
  • **
  • Posts: 61
  • LV: 1
  • Gender: Male
    • View Profile
Re: [XP][VXA] Drago Pixel Movement
« Reply #17 on: June 29, 2017, 09:34:56 AM »
That solution didn't work. I just tried cogwheels pixel movement, and there're no such issues, event touch triggers without any problem and it events don't get confused - but... I still think yours feels better, isn't 'shaky' and is compatible with footsteps sounds script.

There's script - https://pastebin.com/eZztLTiC
Maybe you'll learn something from it, and improve your own? Of course if you have time. No need to rush.
« Last Edit: July 04, 2017, 10:35:20 PM by Kise »

Offline KK20

  • Master Scripter Fixer
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3191
  • LV: 381
  • Gender: Male
  • Choco Octo <3
    • View Profile
Re: [XP][VXA] Drago Pixel Movement
« Reply #18 on: July 07, 2017, 10:11:14 AM »
BTW Drago, regarding the camera moving at the start of the game, I can reproduce it on clean XP too. If the map is, for example, 40x40 in size and the player start position is (12,12), the screen will move up and left upon the map loading. In the following
Code: [Select]
if ... (tile_y = ($BlizzABS ? CY : CENTER_Y)+ 64)

if ... (tile_x = ($BlizzABS ? CX : CENTER_X)+ 64)
if I remove the + 64, it no longer does this behavior.



Other Projects
RPG Maker XP AceUpgrade RMXP to RMVXA performance!
XPA TilemapTilemap rewrite with many features, including custom resolution!


Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Offline LiTTleDRAgo

  • Astral Trancist
  • *****
  • Posts: 851
  • LV: 517
  • Gender: Male
    • View Profile
    • ~
Re: [XP][VXA] Drago Pixel Movement
« Reply #19 on: July 07, 2017, 11:34:05 AM »
Thanks KK20, I forgot that I modified my RTP.
I'll edit the script now.