- Dont fully understand you. You suggest do two factories (enemy and enemy_corpses) and use it? I think there is factory max_instances problem. But I will try it anyway, thanks.
- Every type of weapon have different components (sounds, particles), so I want to generate the prefab (presets of components)
Thanks you for your answers 
Hello @Insality
It will be useful to access sprite UV’s. But i couldn’t find a way to access that option.
Instead my background’s follows character , using character speed and a reduction variable(changes by distance of background). So the player is fast and background is slow, after player passed a background, background changes its position. Here a scene setup.
- You see there is 3 backgrounds with sensor colliders.
Cons :
- jitter between background objects,
- 3 game object with update function.
Pros :
- jobs done.
Its good to know if anyone handles this with an optimum solution.
Best Regards,
Yes. Create two gameobjects (enemy and enemy_corpses). Treat each of them as a prefab. Create two factories (enemy_spawner and enemy_corpses_spawner) and assign the gameobjects (enemy and enemy_corpses) to them. Then you can use the the factories to spawn those gameobjects at runtime.
# Edit: I found this tutorial, that suggests to create collections (which would be your prefabs enemy and enemy_corpses). If you go this route, then you’ll need to use collection factories instead of regular factories.
You can do it either way I think.
@Insality Question (1) -> Do you mean parallax scrolling? If so, and you need to do it with only one sprite, I’d imagine you can use a custom shader to make it work.
1 Like
Just use a simple scroller shader for the uv
Hello @ThunderZ ,
Do you have sample shader for defold , for scroller.
Best Regards,
I’m in holidays for 2 weeks just have some web on my phone (poor connection) but you can start reading this : http://www.defold.com/manuals/material/
Shader in defold isn’t too complicated to setup and you will fond uv scrool shader easily with Google 
If you’re block i’ll help you back to holidays
1 Like
I’m the very bad at shaders, and now trying do it, here the result.
It’s need the atlas with single image to correct wrapping, right?

And i didn’t know how to set correctly wrap UV, so it’s look ugly 
4 Likes
No nice work.
Did you set wrap mode to repeat ?
WRAP_MODE_REPEAT
Texture data outside the range [0,1] will repeat
1 Like
Yea! Im tried to do it, but seems I have set it to wrong constant name
Now I set it to parameter “DIFFUSE_TEXTURE” and all works well. The sprite wrap correctly.
2 Likes
Nice to see that is working 
1 Like