Hi guys,
I've been searching everywhere for this one, I know it will be a popular code.
I'm making my first game and simply want an enemy to pace left and right at the top of the screen.
I'm new to batari, but whenever I've used Spectrum Basic, I've literally changed the graphic once it reaches the appropriate edge of the screen, ie, leftfacing becomes rightfacing, and somewhere I'll put in 'if leftfacing then x=x-1' etc. I tried to do the same in batari with 'if REFP1=8 then player1x=player1x-1' and changing REFP1 numbers when it reaches a point near the screen edge but this isn't working, neither is doing stuff like assigning a direction value to read whether the character's facing left (if dir=8...) or right (if dir=0...) and going 'if dir=0 then REFP1=0: player1x=player1x+1.
I'm sure there'll be something obvious and simpler than what I'm doing but I think I'm close to finishing my first game and this is driving me crazy!
Thanks for any help anyone can offer. This seems like a great community!