Skip to content

Commit

Permalink
docs(feature): Specify that tile collisions require the tile map to h…
Browse files Browse the repository at this point in the history
…ave a tile set with a sprite attached

YoYoGames/GameMaker-Bugs#4751
  • Loading branch information
gurpreetsinghmatharoo committed May 7, 2024
1 parent 3067cbd commit 8b04576
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ <h3>Collisions With Tile Maps</h3>
<p>You can combine objects and Tile Maps when passing an array to a collision function.</p>
<p>Keep in mind:</p>
<ul class="colour">
<li>Collisions against Tile Maps are checked using the collision mask of the sprite used for the Tile Set, which can be modified in <a data-xref="{title}" href="../../../../The_Asset_Editors/Sprites.htm">The Sprite Editor</a>.</li>
<li>Collisions against Tile Maps are checked using the collision mask of the sprite used for the Tile Set, which can be modified in <a data-xref="{title}" href="../../../../The_Asset_Editors/Sprites.htm">The Sprite Editor</a>. This means that Tile Maps that do not have a Tile Set asset attached (or the Tile Set does not have a sprite) will not work with collision functions (it will always return <span class="inline2">false</span>).</li>
<li>&quot;<strong>Disable Source Sprite Export</strong>&quot; needs to be <strong>unchecked</strong> in your Tile Set&#39;s <a href="../../../../The_Asset_Editors/Tile_Sets.htm">editor</a> for tile collisions to work, since the sprite is needed for collision checking.</li>
<li>A function like <span class="inline3_func"><a data-xref="{title}" href="../../Asset_Management/Instances/instance_place.htm">instance_place</a></span> or <span class="inline3_func"><a data-xref="{title}" href="collision_circle.htm">collision_circle</a></span> (and other equivalents) may return 0 if a collision was found with a Tile Map having the ID 0. This means you should not use the return value as a boolean condition. Instead, check whether the return value is not <span class="inline2">noone</span>, meaning a collision was found.</li>
<li>&quot;<strong>Disable Source Sprite Export</strong>&quot; needs to be unchecked in your Tile Set&#39;s <a href="../../../../The_Asset_Editors/Tile_Sets.htm">editor</a> for tile collisions to work.</li>
</ul>
<h2 id="h">Bounding Boxes</h2>
<p>Some instances will use a rectangular bounding box for checking collisions (unless a different mask shape is selected).</p>
Expand Down

0 comments on commit 8b04576

Please sign in to comment.