Firts at all forguet item name, we are going to work with item numbers (ids), and does ot matter what's the name is.
When you place an item in a map, GG automatically assign some number to the item (usually has to do with the order the item was placed); so the firts one is the number 1, the second is the number 2, and so on.
Please notice arrow plus rectangle in the pic below.
You can notice the jetpack being the item number 6 (6{70006}), so if your key is let's say, number 2 and 3 and 4, so you has to change this line in script below: notice here - 6{70006} - number 6 being the firts number, out of the brakets.
number = math.random( 5, 7 ) -- for me entities number are: 5, 6, 7
This line should looks like:
number = math.random( 2, 4 ) -- since your keys numbers are: 2, 3, and 4.
Here you want 1 key being spawned in random position .
So, instead of work with 3 differents positions for 1 key, we are going to work with 3 keys, each one place in a different position in the map. I do considered this way as the easier for you.
So, each time you run the script, you will spawn a ramdom key, so you'll get you goal, with different approach.
1- place 3 key in different position each one, in your map.
2- attach the script to your trigger - as explain above.
3- Make all keys, " SpawnAtStart = no", for each one. via properties panel.
run your level, and enjoy.
3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz
OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics