Hi Guys…
How does it works panel sprite extension? what kind of sprite can you create?
Another question…to do a moving platform is there any special sprite?
Can we set in properties of an object if it is solid,platform,… like in construct classic?
Thanks
Hi
I don’t know anything about panel sprite I’m also new to GD, but as far as I can see it can be useful if you want a specific side of an object to be scaled and you can change the image of the object ingame. If you are using a normal sprite object, you have to use animations to change appearance of the object, and you can’t choose which side to be scaled, you can scale the object only as a whole but If I’m wrong, somebody going to fix me.
To make and move a platform there is no specific platform object and events to use, as far as I know. You can use sprite object to make a platform, and you can use events to move the platform.
To make a platform, so the player can stand and walk on a platform object, you can use physics extension or collision check between the player and the platform sprite object. You can find a platformer example in GameDevelop. To move a platform, you can use pathfinding extension so the platform object can move on a path, or you can use Displacement action event to move the platform object in to a direction or position.
For example, to move an object left using displacement:
in any condition: Add to platform a force to Angle : 180 and Length : 100 pixels
Or you can also move it in to a position of an other object (object is on the left side) like so:
in any condition: Move platform to Object with Length: -100 pixels
Or in to a specified position (position is on the left) like so:
[code]in any condition: Move platform to position : X=50 and Y=100 Length: -100 pixels
In this case, you can also reference an object as position like so:
in any condition: Move platform to position : object.X() and object.Y() Length: -100 pixels [/code]
About panel sprite objects: As its name suggests, it’s very util to make panels. A panel is composed by four edges with an image or color as centre. Panel Sprite object take 5 parameters: Top, Left, Right, Bottom and Texture; the texture is your panel sprite (edges or borders included), then you should set, in Top, the top edge’s height, etc. :

Then if you resize, only is resized the cetre, not the defined edges:

Of course the panel’s size can’t be smaller than the sum of the edges.
About platform: As ddabrahim says, you haven’t an automatism Plataform, but you could use Physics automatism [maybe (I don’t know if it would be stable) set the platform as “static” and always change the object position, because if the object is “static” you can’t add forces or impulses to it].
Lizard…like always thank you very much…
But i do not see at this moment the use of this panels and the borders…can you put me any example of the use of this objects?
Thanks
Of course, here is a little example:
PanelObject.rar (2.89 KB)