Picking ?

For questions about using Classic.

Post » Mon Feb 04, 2013 8:55 pm

Hello everyone !

First of all, if there's anything I say that you don't understand, feel free to ask any question, I'm french and English was never my favorite class as a student. :P

The thing is, I'm currently working on custom physics for my conceptual platformer, but I'm having some trouble making it work as it should.

Actually, to explain my problem I need to schematize it. Here we go:

-There are two objects, which I'll call " Tile" and " Chgmt ".
-Platforms are made of "Tile"

-All of the "Tile", which are juxtaposed, have their color changed in the case "Chgmt" is overlapping one of them.

I don't know how to translate it into code.
I'm guessing that I have to use " Picking by comparison ", but I don't really know which values could be help me.

I can't provide you my current .cap because it uses a different bugged method, so here's a little schema for you to understand better:

Thanks for your help and have a nice evening ! xi4oxi4o2013-02-04 21:20:16
Posts: 1
Reputation: 456

Post » Mon Feb 04, 2013 9:57 pm

Is this a tile map?
if so
are your tiles mapped to an array?
if not, i recommend you do that. The most advance tasks you can preform in construct use arrays ( or super structures, if you get the plugin).

and its almost critical to working with tile-maps.
if not,
assign the tiles in a group a variable, like ('number')
give all the tiles in a group the same value 'number'.

then on a event
using the function object

"Chgmt" is overlapping "Tile" at offset 10(or whatever):
    ----> add parameter tile.value('number')
        call function("pick") forgetting objects

on function "pick":
    - for each tile
    - tile 'number'= parameter 1 :
                      ---> change color.
Bartosh2013-02-04 22:01:15
Posts: 249
Reputation: 2,323

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 9 guests