So I'm trying to spawn 4 (or any number) events close to another event that dies. I want them to appear randomly within (let's say) +/- 2 for both the X and Y of the original event. And the boundaries are that they have to be within the walkable part of the map, so a<(X +/- 2)<b and c<(Y +/- 2)<d. Is there some easy script for this?
I tried setting it up with event commands, but they just caused huge lag and didn't work, probably because of some loops inside of loops or something? I tried doing it so that I set a loop to spawn 4 events and inside of that was a loop where I tried achieving the coordinates within the boundaries with different control variables and conditionals. Can't figure it out at least at the moment.
EDIT: To be clear, the original event moves around, so its (X,Y) isn't fixed.
I tried setting it up with event commands, but they just caused huge lag and didn't work, probably because of some loops inside of loops or something? I tried doing it so that I set a loop to spawn 4 events and inside of that was a loop where I tried achieving the coordinates within the boundaries with different control variables and conditionals. Can't figure it out at least at the moment.
EDIT: To be clear, the original event moves around, so its (X,Y) isn't fixed.