1
General Land Before Time / Sharpteeth battle
« on: February 05, 2009, 01:47:48 PM »
Awesome!
Now I wait for it to finish downloading...

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Hmm, do you have experience in Blitz3d programming, because this code you posted up is the same language we're writing the game in.
Function SetupGravity(Character.Character)
;Enable gravity on land characters
If Character/movement = walking
;Increase the fall rate only if the character is not touching the ground
If EntityCollided(Character/model,ground) = False
If Character/lateral_Speed > maximum_fall_rate
Character/lateral_Speed = Character/lateral_Speed - 0.1
EndIf
Else
Character/lateral_Speed = 0
EndIf
;Jump
If KeyHit(Jump_Key) Then Character/lateral_Speed = 1
ElseIf Character/movement = flying
;Your flying code here
EndIf
;Move the character up or down
TranslateEntity Character/model,0,Character/lateral_Speed,0
End Function