Hm...i see thats what i wanted alright.
Thanks.
But theres a problem...
I wanted to managed the creation of the platforms through a global variable.
My idea is to have a global variable that controls the creation of several types of platforms as the player progress through the game.
Every time the player would reach the end of the layout, the global variable would choose between a certain amount of numbers(1,2,3,4 and so on) and depending on what it picked it would create one instance of the corresponding platform.
Say it picked 1, it would create one platform with the horizontal sine behaviour at a certain location on the layout.
If it picked 2, it would create only one instance of another platform with its corresponding behaviour...and so on.
I´m not sure if im making myself understandable but that´s basically what i was aiming for.