How do I combine multiple sprites to 1

0 favourites
  • 3 posts
From the Asset Store
Be quick and choose the right answer for the shown equation.
  • Hello!

    I am working on a MOBA now and just added bushes or gras where you can hide.

    Those grasses are made off like 5 grass tiles, but is there a way I can combine them together? Like tag all 5 and select something like "combine" ? (As in Gimp2 or PS)

    It would save me some memory I guess since the object is still the same as the single ones. But when I enter a bush now, only the parts I collision with are changes to opacity 25 (so I have vision in the bush) for me. After that all the bush tiles are visible as long as I am in the complete bush-part. When I leave the bush, all the bush tiles are back to opacity 100.

    When I could combine those tiles, it would be possible for them to behave as they are 1 bush all together, rather than 5 different.

    Since I want some more bushes with different sizes in my game, I had to do way more coding + sprites for each bush <.<

    P.S. The game is splitscreen and the bushes behave different for both players. So when player 1 enters a bush, the bush is still at opacity 100 for player 2, just for make some clarity. I also want to add a online multiplayer with photon later so don't complain on how useless bushes are in 1vs1 splitscreen xD

  • You'll want to use containers for this I think. Put all grass tiles into a container object. Pick one grass tile, all tiles in the bush are picked. Destroy one grass tile, all tiles in the bush are destroyed. Set the opacity of one tile, all tiles in the bush change opacity. Not sure why you don't just have one bush object though, seems like it would be easier. If you have to make the bush from 5 grass tiles then containers are the way.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hm thanks, I guess I just make bush objects for every bush with all the tiles in it already.

    With the grass tiles I would only have 1 sprite but could make bushes in many different sizes out of it, that's why I wanted to combine them.

    P.S. I found a solution. (Somehow like yours but no containers) I just made invisible bush hitboxes and whenever a player is overlapping it, it will set all the bushes overlapping this hitbox to opacity 25.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)