putting tiles on board

Blitz3D Forums/Blitz3D Programming/putting tiles on board

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Couple of things I noticed - there may be others :)

; now create an array called boardarea of 10 by 10 and
; fill in the entire matrix with 0
For fillx = 0 To 9
	For fillz=0 To 9
		boardarea(fillx,fillz)=0
	Next
Next

This code isn't needed since integer arrays are automatically 'zeroed'.



; Now read it and put an new entity in that location...
; Somehow I get ONLY 2 entitys on the gameboard!!!

For row = 0 To 9
	For col=0 To 9
		If boardarea(row,col) = 0
		PositionEntity n\entity,boardx(row,col),1,boardz(row,col)
		EndIf
	Next
Next

The problem is you're continually (re)positioning the same entity (n\entity) every time through the loop.