DO
oldtime = TIMER 'makes the timer count up from zero
x = 3
y = 7
enemyx = 20
enemyy = 18
PRINT "TIME: "; INT(oldtime - TIMER)
LOCATE y, x
PRINT ".8."
IF TIMER = (this is the part im having trouble with) THEN
locate enemyy, enemyx
PRINT "|8."
LOOP
DIM TimeToExpire AS DOUBLE
DIM SecondsToWait AS DOUBLE
SecondsToWait = 5.5
PRINT "Timer started..."
TimeToExpire = TIMER + SecondsToWait
DO
LOOP UNTIL TIMER >= TimeToExpire
PRINT "Time's Up! " + LTRIM$(RTRIM$(STR$(SecondsToWait))) +" seconds have passed."
Here's your code revamped to use TIMER to move the enemy after a set amount of time. Change the whenToMoveEnemy variable to anything .01 seconds or more to set the time between enemy movements.
You'll notice there was a need to add another timer-related variable to make this work right. The first variable (startTime) is set only once so that the total timer displays correctly. The oldTime variable resets to TIMER whenever the enemy moves.
DIM startTime AS INTEGER
DIM x AS INTEGER, y AS INTEGER
DIM enemyx AS INTEGER, enemyy AS INTEGER
DIM whenToMoveEnemy AS DOUBLE
DIM oldtime AS DOUBLE
whenToMoveEnemy = 3
x = 3
y = 7
enemyx = 20
enemyy = 18
startTime = TIMER
DO
LOCATE 1,1
PRINT "TIME: "; INT(TIMER - startTime)
LOCATE y, x
PRINT ".8."
IF (TIMER - oldtime) >= whenToMoveEnemy THEN
locate enemyy, enemyx
PRINT " "
enemyx = enemyx - 1
IF enemyx < 1 then enemyx = 40
locate enemyy, enemyx
PRINT "|8."
oldTime = TIMER
END IF
LOOP