|
Post by cundo on Mar 13, 2023 20:56:03 GMT
I've asked the AI to code a loop so I can increase the size of a sprite and at the same time its 'speed' like a racing game with perspective. The AI Gave me this
idx = 1 MAXIDX = 512
' the loop starts here, I'm using a timer currently if idx < MAXIDX then for k = 1 to abs(MAXIDX/2 - idx)/(MAXIDX/2)+1 idx = idx * 1.5 next k
end if
Print "El valor de idx es: "; idx
It works, I don't know what that ABS( part does, but it works.
|
|
whiskeyd
Member in Training
That that is is, that that is not is not, that that is not is not that that is.
Posts: 23
|
Post by whiskeyd on Mar 13, 2023 23:35:46 GMT
ABS is absolute value, i. e. changes a negative to a positive number. It insures that neither the size or the velocity of the sprite is negative.
|
|