Spawning only one actor

Hi, I have a treasure chest and when my actor collides with it it spawns a key. What is the best way to spawn only one key. Right now every time my Actor collides with the cheek another key spawns. I can destroy the chest, but I want it to remain on the screen

Comments

  • RabidParrotRabidParrot Formally RabidParrot. Member Posts: 956

    Tell the treasure chest it only has one key.

    Make a "#ofkeys" integer attribute with the value of 1.

    When the chest collides with the player and the # of keys integer is 1,

    spawn key, change key integer to 0.

  • quinn221quinn221 Member Posts: 280

    @RabidParrot thanks!

Sign In or Register to comment.