In my game i have 4 different enemies. When the player kills an enemy they spawn a key that opens a chest.
I'd like to be able to have a different enemy spawn that key. EXAMPLE: player kills enemy 2, they spawn the key. If the player quits the game and restarts or passes that level on the next level(s) enemy 4 will spawn the key.
Thanks for any help.
My first thought is to have an instance variable that is a boolean (hasKey - default to no). Then set an event to randomize it
On Layout Start - > pick random instance --> set boolean to yes
Or could do:
On instance destroyed
If instance count > 1
If random(0,1) > 0.75 then spawn key
Else (if instance count is 1) then spawn key