Page 50 of 92

Re: Simple Tiled Implementation - STI v0.14.1.13

Posted: Tue Jun 07, 2016 11:11 pm
by LordSeaworth
Karai17 wrote:You need to download bump separately, yes. The plugin is simply an interface.

In Tiled, you can set custom properties of basically anything. Layers, tiles, objects, etc. If you set a property called "collidable" and give it the value "true", then when you initialize your physics world, in your case Map:bump_init(), it should detect all of those collidable flags and convert them into physics objects.
Thats what i'm trying. I've added an object layer with the option collidable true and also on a tile itself. But the count keeps giving 1.
There a way to draw all the objects with a border or a block itself so you can see them?

Re: Simple Tiled Implementation - STI v0.14.1.13

Posted: Tue Jun 07, 2016 11:21 pm
by Karai17
I'm not terribly familiar with the bump plugin, I didn't write that one. You'll have the check the source to see if there is a draw function.

Re: Simple Tiled Implementation - STI v0.14.1.13

Posted: Tue Jun 07, 2016 11:25 pm
by LordSeaworth
Karai17 wrote:I'm not terribly familiar with the bump plugin, I didn't write that one. You'll have the check the source to see if there is a draw function.
But why does it only return 1 on count? Shouldn't the sti plugin have added the collidable tile layers and tiles?

Re: Simple Tiled Implementation - STI v0.14.1.13

Posted: Tue Jun 07, 2016 11:27 pm
by Karai17
As I said, I am not really familiar enough with that plugin to say one way or the other. It might be a bug in the plugin, it might be a bug in your code. :(

Re: Simple Tiled Implementation - STI v0.14.1.13

Posted: Tue Jun 07, 2016 11:28 pm
by LordSeaworth
Karai17 wrote:As I said, I am not really familiar enough with that plugin to say one way or the other. It might be a bug in the plugin, it might be a bug in your code. :(
Okay ill try and look into it.

Re: Simple Tiled Implementation - STI v0.14.1.13

Posted: Wed Jun 08, 2016 6:11 am
by bobbyjones
There is a method :bump_draw. And what do you mean count returns 1?

Edit: nvm, I see what you mean. The objects should be added to the world if you use the correct flag. I have tested it previously and should work. If you need an example on how I use this plugin(that I wrote) follow the link below.


https://github.com/Bobbyjoness/Boredom?files=1

I don't use an object layer in the maps provided but you can add it in yourself and it will just work. It's a bit old but it's still relevant. I actually should update my codes lol.

Re: Simple Tiled Implementation - STI v0.14.1.13

Posted: Wed Jun 08, 2016 7:25 am
by LordSeaworth
bobbyjones wrote:There is a method :bump_draw. And what do you mean count returns 1?

Edit: nvm, I see what you mean. The objects should be added to the world if you use the correct flag. I have tested it previously and should work. If you need an example on how I use this plugin(that I wrote) follow the link below.


https://github.com/Bobbyjoness/Boredom?files=1

I don't use an object layer in the maps provided but you can add it in yourself and it will just work. It's a bit old but it's still relevant. I actually should update my codes lol.
I was actually using code form that example.
I just can't seem to add the tiles from my tiled map to be object loaded into bump

Re: Simple Tiled Implementation - STI v0.14.1.13

Posted: Wed Jun 08, 2016 7:48 am
by bobbyjones
I should add that it only works with rectangles. So if you add a circle it won't work. Other than that I can't think of what can be the issue. If you want you can post the map file and I will get to it tomorrow.

Re: Simple Tiled Implementation - STI v0.14.1.13

Posted: Wed Jun 08, 2016 10:30 pm
by LordSeaworth
bobbyjones wrote:I should add that it only works with rectangles. So if you add a circle it won't work. Other than that I can't think of what can be the issue. If you want you can post the map file and I will get to it tomorrow.
I'm just trying to get the tiles from tiled to be object in bump so they are all squares by itself?

Re: Simple Tiled Implementation - STI v0.16.0.1

Posted: Fri Jun 10, 2016 1:03 am
by Karai17
Updated STI:

* Now compatible with Tiled 0.16.0 (0.16.1)
* Custom Properties now use proper boolean types instead of strings, so if you use the Box2D or Bump plugins you will need to update this one way or another.