aymankoo wrote:I have a background which have many collision rectangles (something like isometric game example). now I want randomly yo create object where the object will be created only inside the allowed move area so the player can collect it. How I can achieve this.
You can achieve it this way:
At the beginning of the scene iterate along all the collision rectangles objects with a For Each loop, in the For Each loop create an ID variable for each collision rectangle and put a number in it (you know, serializaed... 1, 2, 3, 4, 5... 98765, etc). When you want to create an object just pick up a random number with the RandomInRange() event and then iterate trough all the collision rectangles again searching for the one with that ID. then create the collectible at the coordinates of the collision rectangle with that specific ID.