Previous frame check?

Blitz3D Forums/Blitz3D Beginners Area/Previous frame check?

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.

ok, i tried what you said but it isnt playing the sound, here's what i've got:

hitground=LoadSound("land1.wav")
groundhit#=0
;____________________________________________________
While Not KeyDown(1)


If CountCollisions (camera)=True Then cam_hit_ground#=1
If CountCollisions (man)=False Then TranslateEntity man,0,-2.7,0

If KeyDown(203) And CountCollisions (camera)=False Then TurnEntity campiv,0,3,0
If KeyDown(205) And CountCollisions (camera)=False Then TurnEntity campiv,0,-3,0
If KeyDown(208) Then TurnEntity campiv,3,0,0
If KeyDown(200) Then TurnEntity campiv,-3,0,0

If KeyDown(57) Then TranslateEntity man,0,5,0
If KeyDown(17) Then MoveEntity man,0,0,1.5
If KeyDown(30) Then TurnEntity man,0,3,0
If KeyDown(32) Then TurnEntity man,0,-3,0
If KeyDown(31) Then MoveEntity man,0,0,-1


If CountCollisions(doorzone)=True Then doornear#=1
If CountCollisions(doorzone)=False Then doornear#=0
;If CountCollisions(doorzone)=True Then TranslateEntity door,0,2,0
;If CountCollisions(doorzone)=False Then TranslateEntity door,0,-2,0
If doornear#=0 And EntityY(door)>60 Then
TranslateEntity door,0,-2,0
;TranslateEntity doorzone,0,0,-2
EndIf
If doornear#=1 And EntityY(door)<200 Then
TranslateEntity door,0,2,0
;TranslateEntity doorzone,0,2,0
EndIf

If CountCollisions (cantina)=True And groundhit#=0 Then PlaySound hitground
If CountCollisions (cantina)=False Or CountCollisions (plane)=False Then
groundhit#=0
Else
groundhit#=1
EndIf