Few remarks:
-_rand = 0 // no need to declare
-_rand = random 10 will give u something like 7.256
Use _rand = (random 10 - (random 10 mod 1))
-Gamelogics are big flags in the editor,hard to position.
Better use markers,U can set them to empty when game starts,use getmarkerpos instead of getpos.
-U also have to setpos the triggers around the flags