Cant get this to work

Blitz3D Forums/Blitz3D Programming/Cant get this to work


A number > 0 is assumed to be true so the > 0 is unecessary.



True, but EntityCollided() returns an entity pointer. Altough it appears as a number like "15904320" its not an integer. Surprisingly yet, if that pointer is the only condition, it will work. If theres other conditions, it wont.

Try the following code, uncommenting either the first or second entity line.

Graphics3D 800,600,16,2

;entity = CreatePivot()
;entity = 1321321

If entity DebugLog "This always works"
If 2>1 And entity DebugLog "This works only if entity is an Integer - not an entity pointer"

Stop
End