Moving a region using a grid or using columns/rows (and running a function as it moves each time).
Trigger below doesn't work, but math seems correct.
Generator_CoreEventsTimer-Every0.03secondsofGameTimeLocalVariablesGetRegion=NoRegion<Region>RegionDistance=0.0<Real>RegionTotal=0.0<Real>Relocation_Point_X=0.0<Real>Relocation_Point_Y=0.0<Real>Stage=1<Integer>ConditionsActionsGeneral-If(Conditions)thendo(Actions)elsedo(Actions)IfRegionDistance==10ThenVariable-SetRegionDistance=1.0Variable-SetRegionTotal=(RegionTotal+1.0)ElseVariable-SetGetRegion=Gen_Block1Variable-SetRegionDistance=(RegionDistance+1.0)Variable-SetRelocation_Point_X=(((Xof(CenterofGen_BlockStart))+((RegionDistance*10.0)+10.0))+0.0)Variable-SetRelocation_Point_Y=(((Yof(CenterofGen_BlockStart))+RegionTotal)+0.0)Region-MoveGen_Block1to(Point(Relocation_Point_X,Relocation_Point_Y))Variable-SetTimer_int=(+(1,Timer_int))Generator_Pile_GroundProps()Update_GenBar()General-If(Conditions)thendo(Actions)elsedo(Actions)IfTimer_int==100ThenDialog-HideGenBar_Dialogfor(Allplayers)Trigger-Run(AfterGen)Initialization(CheckConditions,Don't Wait until it finishes)Trigger-Turn(Currenttrigger)OffElse
Note that some variables/sections that may seem oddly placed or irrelevant are for future intended purposes.
Here it is nearly same working with map :)
Btw. "Width of reg * Col" etc can be replaced in case you need bigger spaces with "(Width of reg + x) * Col". Also note that if you region is not square or circle Width and Height of reg can return some weird numebrs
I used your exact setup and the doodads are generated in the correct shape, but the entire thing is pushed up and to the right of the map. In other words: the shape is pushed to the top right corner of the map. Umm... I don't even know where to begin to look now.... I did what you did - checked your map, it works there, do the same thing in my map, it's broken. Sigh. Why is this simple thing being so looney? Did I mess up on something simple?
Idk its sound odd :p At first you need to understand how it works
add debug after move region like
UI-Display(Combine("x = ",(Text((Xof(Centerofreg)))with2decimalplaces)," Y = ",(Text((Yof(Centerofreg)))with2decimalplaces)))for(Allplayers)toDebugarea
"x = "
X of point (center of region(reg))
"y= "
Y of point(center of region(reg))
Check what values you get if Y is increasing over time it means you need to remove *-1 (this would be weird tho) if you say it moves UP probably Y with some odd reason will be increased over time instead of being decreased. Only thing that really do the work here is move region. Play with values there. adding *-1 to X offset for example will result in region moving from right to left
Moving a region using a grid or using columns/rows (and running a function as it moves each time).
Trigger below doesn't work, but math seems correct.
Note that some variables/sections that may seem oddly placed or irrelevant are for future intended purposes.
if i understand good (because you over explained) you want to move it in table like pattern. row, columns..
Haven't tested but should work. The move is move to point (point with offset(x,y))
@Nerfpl: Go
Didn't work. At all.
Simplified the definition, hope you can understand it 'gooder'.
Here it is nearly same working with map :)
Btw. "Width of reg * Col" etc can be replaced in case you need bigger spaces with "(Width of reg + x) * Col". Also note that if you region is not square or circle Width and Height of reg can return some weird numebrs
Thanks for the help, it works... with this issue:
I used your exact setup and the doodads are generated in the correct shape, but the entire thing is pushed up and to the right of the map. In other words: the shape is pushed to the top right corner of the map. Umm... I don't even know where to begin to look now.... I did what you did - checked your map, it works there, do the same thing in my map, it's broken. Sigh. Why is this simple thing being so looney? Did I mess up on something simple?
Idk its sound odd :p At first you need to understand how it works
add debug after move region like
"x = " X of point (center of region(reg)) "y= " Y of point(center of region(reg))
Check what values you get if Y is increasing over time it means you need to remove *-1 (this would be weird tho)
if you say it moves UP probably Y with some odd reason will be increased over time instead of being decreased. Only thing that really do the work here is move region. Play with values there. adding *-1 to X offset for example will result in region moving from right to left