I’m having a problem with my minigames icons. All of them are generated through events, along with the tweening.
The problem is that the tweening of the first icon is not right.
When I launch the game, the first time, it tweens too fast, the second time, it tweens a bit late, and the subsequent times, it tweens very late.
All the other icons tween just right every time.
Here are the related events:
It seems that for some reason, the Do = 0.01 to the scale of Jeux bugs for the first one only. I tried adding a condition with the Variable ID of Jeux, but it’s not fixing it…
And I can’t put the scale action in the same block as the Create action. That seems to be a bug/limitation of GDevelop I noticed on several occasions.
Can you spot my mistake?
As for the issue, maybe all of the actions related to positions are conflicting?
Where the object is created at position jeux.Xpos and jeux.Ypos
Do + Variable(taille) to scene variable jeux.Xpos
Then under the carriage return group, you’ve got…
Scene variable jeux.Xpos is >720
Do = Variable(taille) to scene variable jeux.Xpos
Do = Variable(taille) to scene variable jeux.Ypos
Or maybe the numeric ID of the object instance in the tween name field is causing a problem. I usually have better luck when using text and underscores with spelled out numbers like “jeux_one” when naming tweens to go with objects that have different IDs, positions, or other properties. Helps keep them straight too.
The other possible issue with the variable ID might have something to do with how it’s being assigned. How are you generating it and differentiating them? If the scene variable jeux.nombre is < 9, when you do Variable(jeux.nombre) to ID of Jeux, I think it’s not creating any specific IDs for each created object. It’s the same value being applied to all of them.
In similar cases, I found it helpful to specify the exact positions for each object created as a condition, then apply unique instance ID’s, and from there it’s easy to do other events based on the ID. For this, you might have to add the instances to the scene temporarily in order to get the desired coordinates (I write them down on scrap paper), then delete them when you’ve got your object creation events set up.
I don’t know if any of this will solve your problem (sorry). Hopefully you can get it working or someone with more concrete suggestions can chime in
The last ones are doing their tweening on the screenshot. And the only one that messes up is Fuuta.
The carriage return creates a second line when the first one is full
I checked the ID variables on the debugger, each instance has the number it’s supposed to have.
I thought about the tween name. I tried using “tween” alone and “tween” + ToString(Variable(jeux.nombre)), same issue. I don’t think the name matters much anyway, unless you need to use it in a condition.
The whole point of the exercise is to generate the icons on the fly, so I don’t want to add them manually/one by one.
Gotcha. I figured it wouldn’t be ideal to handle generating the icons separately and wasn’t sure about those positions/IDs, but the brainstorming exercise was fun anyway lol. Thank you for clearing up my misconceptions.