Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Multiple versions of an asset with different exports set and snapping question

A topic by Game Dev With Michael created 17 days ago Views: 40 Replies: 3
Viewing posts 1 to 2

I was looking at this to help with building levels for my game and potentially creating an in-game level maker.

Two questions that come to mind:

  1. Is there anyway to have multiple assets with different values set for export variables? I’m guessing the answer would be that I would need to make multiple scenes?

  2. Can you tell me a bit more about snapping and offset? My issue with standard Godot snap is that I would essentially have to create vertical lines. I would want to offset some of my objects at half the width so they would be in a stagger pattern.

Developer (1 edit)

Hello Michael,

1. Your guess is right, you would have to make multiple scenes (using inherited scenes could work very well). However, you can also press Alt+Click to place and select the object, so you can quickly change inspector settings, and SPACE to immediately reselect the asset for another placement, which might also be a fast workflow if you only have to change a few properties.

2. Snapping works at absolute world position, so if your snap step is set to 1 and you are placing on the XZ plane, you can snap at the XZ coordinates (0,0), (0,1), (1,0), (1,1), (0,2), etc. The offset now helps you offset this absolute snap step by a certain amount, so if you want, say, an offset of 0.3 each on X and Z, your objects would be placed at (0.3, 0.3), (1.3, 0.3), (2.3, 0.3), (0.3, 1.3), etc. You can only configure an absolute step, so the offset cannot adapt to what exactly "half the object's width" would be with your current object, but if you only use objects of the same size, then the offset that you can configure should work fine.

I hope this answers your questions!

(+1)

Thank you it does. I’m going to try a few more things on my own, but if I can’t get anything going then I’ll have to give this a shot.

Developer

I wish you best luck for your project! If there is anything else you want to know about my plugin, be sure to let me know :)