A tileset concept-need help

For questions about using Classic.

Post » Sun Aug 16, 2009 9:32 pm

Well, I had this weird idea- store an entire tileset in one object as seperate animations and have the computer figure out what animation to play depending on how many tiles a block comes in contact with.

The problem is this: It doesn't work. Is it something wrong on my part or is there no way for this to work? (I probably did something really stupid and will regret posting this topic later...)

LINK: http://a.imagehost.org/download/0572/tileset
B
1
G
4
Posts: 7
Reputation: 1,039

Post » Sun Aug 16, 2009 11:35 pm

Slightly bettered version

First of all you got the offset for Up/Down confused. Use a negative offset for Up and a positive offset for Down on the Y axis. I also added a pseudo-grid event (first event). It's more intuitive to work with this kind of stuff like this I believe.

EDIT: And I forgot something very important. You can't check like that for overlap of the same kind of object. You'll have to use the old trick of adding 2 families to your ground sprite (blue + green for example) and then check for overlap of those 2 families then instead.

With the slight changes I made it's at least possible to build boxes out of four ground pieces. But your events in the Tileset Events group don't really work they way you want them to. I already made something like this btw with my PUOP example (tell me if you want to see that source), but it didn't use offset (because I was too stupid back then or there even was no offset yet) and it did load the tiles from PNG files.

If you fiddle around with the events you should be able to get it to work. I just don't have time on my hands right now to set it up myself. Hope this helped a little already.
B
21
S
6
G
10
Posts: 1,024
Reputation: 7,445

Post » Mon Aug 17, 2009 12:16 am

Okay forget the other version, this should work like you wanted it to:

Kind of proper version

Building any kind of boxes now should just work fine. You're missing sprites that are closed on three sides for example, which you'd need to properly form other shapes.

Also note that I made the changes in version 0.99.42, while your original cap appears to have been saved in an older Construct version. Just in case you're wondering why you can't open it, you'll need the latest Construct.
B
21
S
6
G
10
Posts: 1,024
Reputation: 7,445

Post » Mon Aug 17, 2009 12:20 am

Hey that sounds like a good idea.
Make sure collisions are set to bounding box
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Mon Aug 17, 2009 2:36 am

Wow, this helped alot. Now if I could implement that into a level editor of some kind, that would be awesome :)
B
1
G
4
Posts: 7
Reputation: 1,039

Post » Mon Aug 17, 2009 9:06 am

[quote="shawnachu":1ufrrbo3]Now if I could implement that into a level editor of some kind, that would be awesome[/quote:1ufrrbo3]

You could simply use an array to save your levels. Store your object coordinates in the array and use the "Save to file" action. With "Load from file" you can load your level back into the game.

That's how I did it before and I think it would be the simplest way to go.
B
21
S
6
G
10
Posts: 1,024
Reputation: 7,445


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 9 guests