Altimit Pixel Movement [0.50β]

● ARCHIVED · READ-ONLY
Started by xilefian 545 posts Page 15 of 28 View original ↗
  1. miani said:
    You're drawing 2 kind of shapes to work as collisors: circles and rectangles.
    If you want an event/tile to have its collision as a circle you'll use the following comment:

    <circle cx='horizontal distance (in tiles) from the left of the tile' cy='vertical distance (in tiles) from the top of the tile' r='size (in tiles) of the circle' />

    1 = 48px (tile size)
    0.5 = 24px
    0.25 = 12px

    Example:

    <collider>
    <circle cx='0.5' cy='0.5' r='0.5' />
    </collider>

    In this example the circle collisor will have 24px size (0.5 of a tile = 1/2 of 48px). He will be positioned half a tile to the right and half a tile down. If you put "2" in "cx" the circle collisor will be put 2 tiles to the right of the event.

    View attachment 113973

    If you want to make a rectangle collisor you'll use the following comment:

    <rect x='horizontal distance (in tiles) from the left of the tile' y='vertical distance (in tiles) from the top of the tile' width='width (in tiles)' height='height (in tiles)' />

    Example:

    <collider>
    <rect x='0.6' y='0' width='0.4' height='1' />
    </collider>

    In this example I made a rectangle collisor, with a full tile height and 0.4 of width. He will be placed 0.6 of a tile to the right.

    View attachment 113974

    Azlar said:
    Could someone make a tutorial on how to use collision detection for parallax maps? Thanks.
  2. the plugin is just amazing, but it doesn't work with the chrono engine by Mog Hunter, any solution?
  3. chuy said:
    the plugin is just amazing, but it doesn't work with the chrono engine by Mog Hunter, any solution?
    Do you want the ATB or the on-map chrono-trigger style battles?
  4. Restart said:
    Do you want the ATB or the on-map chrono-trigger style battles?
    The chrono-trigger style
  5. chuy said:
    The chrono-trigger style
    Ah sorry can't help you there. I have a frankenengine that currently makes ATB work, which I'm eventually going to clean up into something other people can understand, but since I'm building it for my own project it's ATB only.
  6. Restart said:
    Ah sorry can't help you there. I have a frankenengine that currently makes ATB work, which I'm eventually going to clean up into something other people can understand, but since I'm building it for my own project it's ATB only.
    It's a shame, but don't worry, actually, i think a found a solution, but i need to be able to disable and enable the plugin in game, but i really don't know how to do it
  7. While using this plugin any event that is below the player and activated on touch keeps activating multiple times while walking across the event.
    Is there anyway to make it only activate one time when stepping on it and only activate again if stepping off then back on?
  8. @clitvin I don't know a solution that directly involves the plugin but what you could do is turning on Self Switch A, make a 2nd page with ss A as requirement. Set it to parallel en run a script that checks if the player is north, south, east or west from the event. Use SRD's plugin if you don't know how to script: http://sumrndm.site/collision-checker/

    If the conditional branch is activated it should turn off self switch A.

    2nd option is just setting waiting time so the player has time to leave the event.
  9. Hello, can you tell me if there is any way to get something similiar to this:
    Code:
    Math.abs($gamePlayer._x - $gameMap._events[1]._x) == 1
    I mean "if event is (lets say) 10 pixels away form player" we get action?

    I use this method to let player or enemy attack only when they are close to each other (ABS). Works perfect on Standard Movement.

    I tried to use Dahlys Distance Calculator and do Conditional Branch with "if Dahlys.distCalc.distance(char1, char2) <= x", but i dont think i did it right. Im total noobie in javascript. :x

    Sorry for bad english.
  10. CrasheR said:
    Hello, can you tell me if there is any way to get something similiar to this:
    Code:
    Math.abs($gamePlayer._x - $gameMap._events[1]._x) == 1
    I mean "if event is (lets say) 10 pixels away form player" we get action?

    I use this method to let player or enemy attack only when they are close to each other (ABS). Works perfect on Standard Movement.

    I tried to use Dahlys Distance Calculator and do Conditional Branch with "if Dahlys.distCalc.distance(char1, char2) <= x", but i dont think i did it right. Im total noobie in javascript. :x

    Sorry for bad english.

    Ok with altimits,

    Firstly you have to think like this, with a script like that, the == 1, the 1 is actually 48 pixels.

    Secondly since altimits runs off pixels and not 48x48 grid blocks, saying == 1 means it wont trigger until the player is EXACTLY 48 pixels away from the position, which is hard to do in game xD

    So finally, all that needs to change here is instead of saying == 1, use <= 1. That now says if its less than or equal to 48 pixels away to trigger.

    It's been awhile, so I hope I'm right xD

    EDIT: Just reread your script, try using this way

    Math.abs($gamePlayer.x - $gameMap.event(1).x) <= 1
  11. I did:
    Code:
    Math.abs($gamePlayer._x - $gameMap._events[1]._x) <= 1
    And it works perfect. I feel stupid now xD Really appreciate your help.
  12. miani said:
    You're drawing 2 kind of shapes to work as collisors: circles and rectangles.
    If you want an event/tile to have its collision as a circle you'll use the following comment:

    <circle cx='horizontal distance (in tiles) from the left of the tile' cy='vertical distance (in tiles) from the top of the tile' r='size (in tiles) of the circle' />

    1 = 48px (tile size)
    0.5 = 24px
    0.25 = 12px

    Example:

    <collider>
    <circle cx='0.5' cy='0.5' r='0.5' />
    </collider>

    In this example the circle collisor will have 24px size (0.5 of a tile = 1/2 of 48px). He will be positioned half a tile to the right and half a tile down. If you put "2" in "cx" the circle collisor will be put 2 tiles to the right of the event.

    View attachment 113973

    If you want to make a rectangle collisor you'll use the following comment:

    <rect x='horizontal distance (in tiles) from the left of the tile' y='vertical distance (in tiles) from the top of the tile' width='width (in tiles)' height='height (in tiles)' />

    Example:

    <collider>
    <rect x='0.6' y='0' width='0.4' height='1' />
    </collider>

    In this example I made a rectangle collisor, with a full tile height and 0.4 of width. He will be placed 0.6 of a tile to the right.

    View attachment 113974

    This was super helpful! But I'm having trouble with diagonal walls ...

    screenshot1.png

    I would assume the collision would need to look something like the shape below, but I can't wrap my head around how I would create this shape using colliders?

    shape1.png

    Anyone have any suggestions?
  13. doriantoki said:
    This was super helpful! But I'm having trouble with diagonal walls ...

    View attachment 127307

    I would assume the collision would need to look something like the shape below, but I can't wrap my head around how I would create this shape using colliders?

    View attachment 127308

    Anyone have any suggestions?

    I don't think this plugin is capable of that. The solution would be to put circles a in line to simulate a diagonal wall.
  14. You can create events with polygon colliders, by specifying the points in order as part of the plugin command, then specifying which collider to use for the event on the notetag. Triangles are fairly simple, it's just three of your square's for corners.

    Then you can just sprinkle invisible triangular events along the edge of sloped map objects, and it should work fine.
  15. Doktor_Q said:
    You can create events with polygon colliders, by specifying the points in order as part of the plugin command, then specifying which collider to use for the event on the notetag. Triangles are fairly simple, it's just three of your square's for corners.

    Then you can just sprinkle invisible triangular events along the edge of sloped map objects, and it should work fine.

    Thank you. I have failed reading comprehension, lol. The information was provided by @xilefian on the first page.

    @miani no it's possible, check the first page. You can create lines, triangles, and regular polygons.

    Just playing around with it at the moment and figuring out how all the shapes work ...
  16. I apologize for asking a possibly stupid question/request. I am trying to use this plug-in for the first time and have no idea what I'm doing. I am seeing images of stuff making the hitbox be noticeable in-game? Are there any guides out there for using this plugin? Or somewhere where I can download the demo again and see if I can figure out from looking at that? (the demo link that is on page 1 is a dead link for me?)
  17. EBroxas72 said:
    I apologize for asking a possibly stupid question/request. I am trying to use this plug-in for the first time and have no idea what I'm doing. I am seeing images of stuff making the hitbox be noticeable in-game? Are there any guides out there for using this plugin? Or somewhere where I can download the demo again and see if I can figure out from looking at that? (the demo link that is on page 1 is a dead link for me?)
    Okay, so if you want to make the hitbox visible, download the altimit debug plugin, place it under altimit movement and enable it.

    As for setting hitboxes, put this in a comment for the event
    Code:
    <collider>
    <circle cx='0.5' cy='0.5' r='1.0416666666' />
    </collider>
    replacing the 'circle' with whatever is appropriate.

    Rectangle (this example makes a tile-sized square)
    <rect x='0.0' y='0.0' width='1.0' height='1.0' />

    Circle (this example makes a tile-sized circle)
    <circle cx='0.5' cy='0.5' r='0.5' />

    Line (this example makes a line from top-left to bottom-right)
    <line x1='0' y1='0' x2='1' y2='1' />

    Polygon must be convex and clock-wise-winding (this example makes a triangle)
    <polygon points='0.0,1.0 0.5,0.0 1.0,1.0' />

    Regular polygon (this example makes a 5-pointed polygon; a pentagon)
    <regular cx='0.5' cy='0.5' rx='0.5' ry='0.5' p='5' />

    note that you can add multiple colliders together for the same event.
  18. Um.. I apologize if this has been dicussed before, but I'm having issues using this plugin due to incompatibilities with Olivia's brightness effects, and YEP region trigger event..
    error image
    Untitled.png
  19. Great plugin. Just wish the followers were a bit less sticky. I personally would love to see follower logic that is like what others have suggested, exactly copying the movements of the player in the "wiggly caterpillar" way ala Chrono Trigger. To me that is the simplest and most elegant solution to the path-finding problem.

    Alternately, something like what the AnalogMove plugin does--the movement there seems similar to the movement in this plugin, in the sense that the followers move straight toward the player's latest location rather than following the player's previous path--but the followers quickly pass through terrain if they're stuck on it.

    Actually, would it be possible with Altimit to disable collision on the followers if they exceed a certain distance from the player, allowing the followers to pass through terrain and catch up? Could a common event and some kind of script call achieve this?
  20. Is there anyway to fix regions for this plugin? I mean they work, but kinda poorly.


    (movie)

    Every tile is another region and mushroom dude reacts to:
    Code:
    $gameMap.regionId($gamePlayer.x, $gamePlayer.y) === $gameMap.regionId($gameMap._events[this._eventId].x, $gameMap._events[this._eventId].y)
    As you can see I dont even need to change region to activate it condition :/