Nov-13-2019, 09:37 PM
I want to add items to my random dungeon. I'm thinking to select a sprite at random from my group of floor tiles and use it's location as a spawn location for a key, a treasure, and some enemies.
Is it possible to select a sprite (and it's location) from a group? My searches have revealed nothing about this.
I want to do something like:
key1 = Key(random_floor_tile.x, random_floor_tile.y)
Then to stop the same floor tile from being used twice, adding the selected tile to a group to check before spawning?
Thanks.
PS. Is there are more Pythonese word to use instead of "spawn"? lol
Is it possible to select a sprite (and it's location) from a group? My searches have revealed nothing about this.
I want to do something like:
key1 = Key(random_floor_tile.x, random_floor_tile.y)
Then to stop the same floor tile from being used twice, adding the selected tile to a group to check before spawning?
Thanks.
PS. Is there are more Pythonese word to use instead of "spawn"? lol