Altimit Pixel Movement [0.50β]

● ARCHIVED · READ-ONLY
Started by xilefian 545 posts Page 18 of 28 View original ↗
  1. NonServiam said:
    I'm trying to use this plugin with TileD, I read that I have to modify the character colliders, but I don't know how I should do it, I'm a beginner. thanks for the plugin.

    Not super up on tiled specifically, but the way you change colliders is either set specific ones with comment tags in the event itself, or in the parameters with plugin commands. Use the altimit debug plugin to see where your colliders.

    You can stack them together, so this:
    Code:
    <collider>
    <rect x='0' y='0' width='1' height='1' />
    <circle cx='0.5' cy='0' r='0.5' />
    <polygon points='0,0 0.8,0 0.8,0.5 0.2,0.8' />
    </collider>
    Will produce a collider that looks like this
    jEHN4Yh.png

    Note that polygons have to be defined clockwise, and purely convex, and any whitespace in your collider definition will result in strange things happening
  2. thanks, this is very useful
  3. Can you add support with YEP_RegionRestriction.js? Thanks you so much.
  4. I have not tested this extensively (not really familiar with how region restrictions work), but this seems to work in my quick 5 min test

    Put this right above "// Special ladder behaviour" in the Game_CharacterBase.prototype.moveVector function

    Code:
    			if(Imported.YEP_RegionRestrictions)
    		{
    			//draw a box around our character and check if it's going into a 
    			//forbidden region.  if it is, prevent it from doing so.
    			var aabbox = this.collider().aabbox;
    			var x2=this.x+aabbox.left+move.x;   
    			var y2=this.y+aabbox.bottom+move.y;
    			//check left and bottom edge
    			if (this.isEventRegionForbid(x2, y2, 5)){ move.x=0;move.y=0;}
    			if (this.isPlayerRegionForbid(x2, y2, 5)){ move.x=0;move.y=0;}
    			var x2=this.x+aabbox.right+move.x;
    			//check right and bottom edge
    			if (this.isEventRegionForbid(x2, y2, 5)){ move.x=0;move.y=0;}
    			if (this.isPlayerRegionForbid(x2, y2, 5)){ move.x=0;move.y=0;}
    			var y2=this.y+aabbox.top+move.y;
    			//check right and top edge
    			if (this.isEventRegionForbid(x2, y2, 5)){ move.x=0;move.y=0;}
    			if (this.isPlayerRegionForbid(x2, y2, 5)){ move.x=0;move.y=0;}
    			var x2=this.x+aabbox.left+move.x;
    			//check left and top edge
    			if (this.isEventRegionForbid(x2, y2, 5)){ move.x=0;move.y=0;}
    			if (this.isPlayerRegionForbid(x2, y2, 5)){ move.x=0;move.y=0;}
    		}

    This only work for region restrictions that FORBID movement, the ones that allow movement would be a lot harder to do and probably aren't as important anyway.
  5. I have it set up to where my actors transfer from one transfer event to another. With this plug-in, my actors get stuck on the transfer event they just transferred to. Is there an easy fix within the plug-in without having to go in and change all my transfer events.
  6. Mkingdom said:
    I have it set up to where my actors transfer from one transfer event to another. With this plug-in, my actors get stuck on the transfer event they just transferred to. Is there an easy fix within the plug-in without having to go in and change all my transfer events.
    I'm not sure I understand how you have it set up and what the problem is.

    The most common issue with altimit and map transfer events is when using the mouse, since the version on github doesn't clear mouseclicks across screen transitions. This can be fixed by changing the cleartransferinfo function

    Code:
    var Game_Player_clearTransferInfo = Game_Player.prototype.clearTransferInfo;
          Game_Player.prototype.clearTransferInfo = function() {
            Game_Player_clearTransferInfo.call( this );
            this._moveTarget = false;
            this._moveTargetSkippable = false;
    	    this._touchTarget = null;// added to avoid mouse clicks lingering across screen transitions.
          };
  7. $gamePlayer.isMoving() don't work, little help please?
  8. SuzuMito7u7 said:
    $gamePlayer.isMoving() don't work, little help please?

    I've tried fixing it and I don't understand the system well enough to make it work (the problem is that ._isMoving gets used during movement processing and cleared at the end of it), so here's a dumb hack. This creates a new _inMotion property which will work exactly like the previous .isMoving()

    Code:
    var Game_CharacterBase_update_for_ismoving = Game_CharacterBase.prototype.update;
      Game_CharacterBase.prototype.update = function() {
    	  //.isMoving doesn't really work in altimit
    	  //this fixes it with the addition of a new function which I can use to tell
    	  //if the character is actually like, moving
    	  // the problem seems to be that the isMoving gets cleared midway through
    	  // this update step (because the .updateMove in rpg_objects sets ._realX to equal .x)
    	  // but lots of things break if I monkey around with _isMoving
    	  // so I'm creating my own clone of it here.
    	  // this is true if the character is in motion and false if they aren't.
    	  if (this.isMoving())
    	  {
    		  this._inMotion=true;
    	  }else{
    		  this._inMotion=false;
    	  }
    	  
    	Game_CharacterBase_update_for_ismoving.call( this );
    }
  9. Restart said:
    I've tried fixing it and I don't understand the system well enough to make it work (the problem is that ._isMoving gets used during movement processing and cleared at the end of it), so here's a dumb hack. This creates a new _inMotion property which will work exactly like the previous .isMoving()

    Code:
    var Game_CharacterBase_update_for_ismoving = Game_CharacterBase.prototype.update;
      Game_CharacterBase.prototype.update = function() {
          //.isMoving doesn't really work in altimit
          //this fixes it with the addition of a new function which I can use to tell
          //if the character is actually like, moving
          // the problem seems to be that the isMoving gets cleared midway through
          // this update step (because the .updateMove in rpg_objects sets ._realX to equal .x)
          // but lots of things break if I monkey around with _isMoving
          // so I'm creating my own clone of it here.
          // this is true if the character is in motion and false if they aren't.
          if (this.isMoving())
          {
              this._inMotion=true;
          }else{
              this._inMotion=false;
          }
         
        Game_CharacterBase_update_for_ismoving.call( this );
    Thank you but... Is neccesary to put the code in a specific line in the plugin?
  10. Nah that's just a separate function you can dump in a little js or whatever, it just adds a little code to the beginning of the character update
  11. Restart said:
    Nah that's just a separate function you can dump in a little js or whatever, it just adds a little code to the beginning of the character update
    It gives me a little error in console (I'm noob in JavaScript)
    1588889536788.png
  12. it's missing a trailing } to end the function
  13. weird..i tried making parallex map and everything worked fine.But when i used altimit plugin the character moves only one tileset.can someone help.?
    im using yep region restriction plugin and bind picture to map plugin too.is it cuz of reigeon restriction one ?


    thank you for your time.
  14. EMOXD said:
    weird..i tried making parallex map and everything worked fine.But when i used altimit plugin the character moves only one tileset.can someone help.?
    im using yep region restriction plugin and bind picture to map plugin too.is it cuz of reigeon restriction one ?


    thank you for your time.
    I'm not sure what you mean by only one tileset? Can you show a picture of your problem, with the alitmit debug active?

    As far as I can tell, if you aren't using my hack, region restrictions shouldn't be producing any effect
  15. welp.i managed made the character walk by customizing the walkable and unwalkable tileset with photoshop.tho when i used region restriction and after adding the codes which the character should be able to walk which it couldnt for some reason. the character just stucked in one placea.pngb.pngc.png
  16. yeah, sorry, my region restriction hack only prohibits movement, it doesn't allow it. I don't understand altimit well enough to do any better
  17. Its weird for me that this work only for 1 time per map. even when i refreshed the game
    Code:
    rpg_managers.js:1949 TypeError: Cannot read property 'right' of undefined
        at Function.Collider.aabboxCheck (Pixel.js:4153)
        at Function.Collider.polygonsWithinColliderList (Pixel.js:3363)
        at Function.Collider.polygonsWithinColliderList (Pixel.js:3365)
        at Function.Collider.polygonsWithinColliderList (Pixel.js:3365)
        at Game_Player.Game_CharacterBase.moveVectorMap (Pixel.js:1009)
        at Game_Player.Game_CharacterBase.moveVector (Pixel.js:1080)
        at Game_Player.moveByInput (Pixel.js:1555)
        at Game_Player.update (Pixel.js:1416)
        at Scene_Map.updateMain (rpg_scenes.js:609)
        at Scene_Map.updateMainMultiply (rpg_scenes.js:600)
    SceneManager.catchException @ rpg_managers.js:1949
  18. Shora said:
    Its weird for me that this work only for 1 time per map. even when i refreshed the game
    Code:
    rpg_managers.js:1949 TypeError: Cannot read property 'right' of undefined
        at Function.Collider.aabboxCheck (Pixel.js:4153)
        at Function.Collider.polygonsWithinColliderList (Pixel.js:3363)
        at Function.Collider.polygonsWithinColliderList (Pixel.js:3365)
        at Function.Collider.polygonsWithinColliderList (Pixel.js:3365)
        at Game_Player.Game_CharacterBase.moveVectorMap (Pixel.js:1009)
        at Game_Player.Game_CharacterBase.moveVector (Pixel.js:1080)
        at Game_Player.moveByInput (Pixel.js:1555)
        at Game_Player.update (Pixel.js:1416)
        at Scene_Map.updateMain (rpg_scenes.js:609)
        at Scene_Map.updateMainMultiply (rpg_scenes.js:600)
    SceneManager.catchException @ rpg_managers.js:1949
    try toggling the cached collision parameter
  19. Restart said:
    try toggling the cached collision parameter
    doesn't work, even when i clone a new js file to turn the param on. Creating a new map let i run around in the first time on that map, but not the second
  20. This plugin is not compatible with Yanfly Event Chase (http://www.yanfly.moe/wiki/Event_Chase_Player_(YEP) ). As soon as the "chase" is initiated there is massive lag. Anyone know why this happens? Any potential hack or workaround to fix it? If not, any alternative plugins compatible with Altimit that achieve a similar effect (making events that will chase the player or flee from the player when the player enters within range of the event or when the event sees the player)?