Ask here your questions to get help using GDevelop.
User avatar
By jack
#70124 I have a waterfall of 14 single images, 8 same segments above each other. It works good, but if I run away and come back, it is messed up. The only solution I have is making my fourteen 110x64 to 110x512 graphics in photoshop.
For my river I have to copy more than 30 same 64px sprites in a row.
Maybe it would be a good idea if "Tiled Sprite" also allow sprite animations in the future.
Image
By Wendigo
#70185 It is hard to tell how your waterfall looks in motion. But you could also achieve something similar by animating the y-offset of a tiled sprite like so:
waterfall.gif
waterfall.gif (491.32 KiB) Viewed 398 times

The waterfall consists of two tiled images, one light and one dark blue which are placed on top of each other.
User avatar
By jack
#70194 @Wendigo Okay danke, probiere ich mal wenn ich wieder ein Problem damit hab. Jetzt habe ich erstmal den ganzen Wasserfall als eine Grafik gemacht, ist insgesamt nur 40kb größer. Hat dadurch dann zwar zwangsläufig ein z order Problemchen wenn man beim Wasserfall in den Fluss springt, aber das ist verschmerzbar.
Ein Video von der Preview recorden war sehr rücklig und pixlig, aber wenn du es dir kurz ansehn möchtest, hier meine Projektdateien. memu.ga/game2.zip

In Kommentar #69964 hat mir Lizard-13 eine Variable erklärt mit der man die Player Steuerung zeitweiße deaktivieren kann. Klingt soweit auch genau nach dem was ich brauch, und ist sicher oft praktisch wenn bestimmte Eingaben nur in bestimmten Situationen gehen. Allerdings weiß ich nicht wie ich "Actions: Move to the left" verwenden soll, da der Player ja seine Steuerung automatisch durch das Platformer Behavior und nicht durch einzelne Actions bekommt.
User avatar
By Lizard-13
#70197 Please don't get offended but it's an english forum, try to not write too much in other languages... btw the GD Discord server has a German channel :)

Allerdings weiß ich nicht wie ich "Actions: Move to the left" verwenden soll

First you have to deactivate the default controls in the platformer behavior settings, with this the arrows and shift/spacebar won't work to move the character by default.
Then you've to use the actions to simulate a key pressed, in the platformer section there're actions to stimulate left, right, jump, etc. It should look like:
Code: Select allConditions: Left key is pressed
Actions: Simulate pressing Left for Player

The same for other controls, and as you're now controlling the movement with events you can put them all as sub-events of a parent event checking that the player can move :)
User avatar
By jack
#70199
Lizard-13 wrote:First you have to deactivate the default controls in the platformer behavior settings...
Ahh okay now it works. :)

How can I change
Code: Select allConditions: Variable inTown of player = 1
Actions: Do = player.Y(top) +32 to Y position of camera (layer: "Town")
to
Code: Select allActions: Do = player.Y(top) -130 to Y position of camera (layer: "Town")
slowly?
It's supposed to be a sunset.
I have tried a lot, so unfortunately I have to ask again.
By Wendigo
#70218 I had a look at you game. The waterfall animation looks exactly the same as yours when you use "wa1.png" on a tiled sprite and shift the y-offset of the texture. But to my surprise I noticed that changing the opacity of tiled sprites is not possible. :(
Nice graphics by the way, I really like your mountain/forest background. Very atmospheric. :)
By MattLB
#70226
How can I change
Code: Select all
Conditions: Variable inTown of player = 1
Actions: Do = player.Y(top) +32 to Y position of camera (layer: "Town")
to
Code: Select all
Actions: Do = player.Y(top) -130 to Y position of camera (layer: "Town")
slowly?


The Y axis works in reverse in GDevelop, so a position of -130 is actually above +32.

Anyway, to make the sun set just use a scene variable e.g. "sunset"in place of the 32 (give it a value of -130 at the start of the scene) and add another action that adds a certain amount to it every second. Something like the following will move the sun down by 1 pixel every second.
Code: Select allActions: Do = player.Y(top) +Variable(sunset) to Y position of camera (layer: "Town")
Do -1*TimeDelta() to variable sunset


If that's too fast, change the 1 to 0.5 or 0.1 or whatever works.
To stop it at +32 just add a check for that as a condition (better to check if <33 than if =32) at the same time you are checking that the Variable inTown of player = 1.