Thanks! I didn't know that!
So now it's working, I can finally create my requested planets sprites on the map. So here is my last move, if I want once the planet is created, delete it from my array:
+ Planets_Array: Value at (0, LoopIndex("Y")) = PlanetSpriteSelected
-> Planets_Array: Delete index Planets_Array.CurY from Y axis
This seems to works fine but it seems that if I repeat my function like this:
+ System: Repeat 3 times
-> Functions: Call CreatePlanets (SetType: 3)
it make some clones of my planets, even if they are deleted.
Do you think it will works better if I repeat the creation of the planets directly inside my function? Like with a variable?