Hi C2 developers!
I tried in many ways to spawn objects only in a sprite collision area, but still didn't get.
Now I'm using the code below, but the objects still are generated outside the collision polygon.
System create objects:
X: random(Sprite.X-Sprite.Width/2,Sprite.X+Sprite.Width/2)
Y: random(Sprite.Y-Sprite.Height/2,Sprite.Y+Sprite.Height/2)
Object isn't overlapping Sprite, then Object Destroy
Does anyone have a better solution to solve this?
Thanks in advance the attention and collaboration of all. ^^
SOLVED BY MadSpy! Link of CAPX example below:
https://www.dropbox.com/s/a2l4zbk7sfqk9 ... .capx?dl=0