digitalis spreader not working

Started by piggood, June 21, 2019, 08:40:14 AM

Previous topic - Next topic

piggood

I was making a unit that moves to Where Digitalis exist and make a 3x3 digitalis growth there. but it doesn't move.
(Sorry I'm bad at english)
ShowTraceLog
CurrentX CurrentY 5 RandCoordsInRange ->x ->y
<-x <-y GetDigitalisGrowth ->hi
<-hi 1 eq if
1 trace
GetQueuedMoveCount ->hi
<-hi 0 eq if
<-x <-y 15 QueueMove
endif
endif
CurrentY 2 add CurrentY 1 sub do
  CurrentX 2 add CurrentX 1 sub do
    I J true SetDigitalisGrowth
  Loop
Loop

Builder17

ShowTraceLog
CurrentX CurrentY 5 RandCoordsInRange ->y ->x
<-x <-y GetDigitalisGrowth ->hi
<-hi 1 eq if
1 trace
GetQueuedMoveCount ->hi
<-hi 0 eq if
<-x <-y 15 QueueMove
endif
endif
CurrentY 2 add CurrentY 1 sub do
  CurrentX 2 add CurrentX 1 sub do
    I J true SetDigitalisGrowth
  Loop
Loop


Changed coordinate order of RandCoordsInRange, try if this code would work any better. :)

piggood