There's a fair bit wrong with that code. Firstly you're doing the loop every tick. Secondly, in the function you're accessing param #0, 1, or 4 but you're only passing one param (sprite.delay). You're also not picking any Sprite objects in the function, so all of them get picked and spawn the Sprite2 objects. I wouldn't use a sprite's UID as they are not fixed (maybe in a trivial test like this but not in a real game). Even so a delay of 0 would be just a stream of Sprite2's coming out. There's more, but how about start over..
PS: I only used IID as a way of getting different delay values, but you could use choose() or random() or anything else.