Altimit Pixel Movement [0.50β]

miani

Veteran
Veteran
Joined
Oct 24, 2015
Messages
77
Reaction score
61
First Language
Portuguese
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
Could someone make a tutorial on how to use collision detection for parallax maps? Thanks.
 

chuy

Warper
Member
Joined
Mar 27, 2018
Messages
4
Reaction score
0
First Language
spanish
Primarily Uses
RMMV
the plugin is just amazing, but it doesn't work with the chrono engine by Mog Hunter, any solution?
 

Restart

Veteran
Veteran
Joined
Mar 15, 2019
Messages
324
Reaction score
207
First Language
English
Primarily Uses
RMMV
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?
 

Restart

Veteran
Veteran
Joined
Mar 15, 2019
Messages
324
Reaction score
207
First Language
English
Primarily Uses
RMMV
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.
 

chuy

Warper
Member
Joined
Mar 27, 2018
Messages
4
Reaction score
0
First Language
spanish
Primarily Uses
RMMV
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
 

clitvin

Veteran
Veteran
Joined
Oct 26, 2015
Messages
95
Reaction score
11
Primarily Uses
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?
 

Chef

yeet
Veteran
Joined
Oct 13, 2017
Messages
283
Reaction score
128
First Language
Dutch
Primarily Uses
RMMV
@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.
 

CrasheR

Project: Dunsa's Prophecy
Member
Joined
May 11, 2012
Messages
28
Reaction score
13
First Language
Polish
Primarily Uses
RMMV
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.
 

bazrat

Pixel Game Maker MV
Veteran
Joined
Oct 15, 2018
Messages
238
Reaction score
167
First Language
English
Primarily Uses
Other
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
 
Last edited:

CrasheR

Project: Dunsa's Prophecy
Member
Joined
May 11, 2012
Messages
28
Reaction score
13
First Language
Polish
Primarily Uses
RMMV
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.
 

doriantoki

Enjoying the Ritual
Veteran
Joined
Dec 20, 2012
Messages
109
Reaction score
26
First Language
English
Primarily Uses
RMMV
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?
 

miani

Veteran
Veteran
Joined
Oct 24, 2015
Messages
77
Reaction score
61
First Language
Portuguese
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.
 

Doktor_Q

I'm not a real doktor, but I am a real Q
Veteran
Joined
Aug 1, 2016
Messages
711
Reaction score
418
First Language
English
Primarily Uses
RMMV
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.
 

doriantoki

Enjoying the Ritual
Veteran
Joined
Dec 20, 2012
Messages
109
Reaction score
26
First Language
English
Primarily Uses
RMMV
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 ...
 
Last edited:

EBroxas72

Villager
Member
Joined
Jun 28, 2014
Messages
14
Reaction score
1
First Language
English,
Primarily Uses
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?)
 

Restart

Veteran
Veteran
Joined
Mar 15, 2019
Messages
324
Reaction score
207
First Language
English
Primarily Uses
RMMV
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.
 

Elliott404

NotRookieGamedev. NotAdvancedEither.
Veteran
Joined
Jul 4, 2018
Messages
545
Reaction score
1,593
First Language
English
Primarily Uses
RMMV
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..
Untitled.png
 

Featherbrain

Warper
Member
Joined
Jan 12, 2020
Messages
3
Reaction score
0
First Language
English
Primarily Uses
RMMV
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?
 

CrasheR

Project: Dunsa's Prophecy
Member
Joined
May 11, 2012
Messages
28
Reaction score
13
First Language
Polish
Primarily Uses
RMMV
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 :/
 

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

Latest Threads

Latest Posts

Latest Profile Posts

For whatever reason I just cant get into the Links Awakening remake even though I know its miles better than the original in almost all regards
Rough Draft. 2nd Video Scene
My new animated paths are beautiful, and look fantastic next to my improved lake/river maps. :LZSexcite:

Forum statistics

Threads
95,710
Messages
931,219
Members
126,061
Latest member
NoaBlua
Top