The problem I was having was with some birds I made to fly around in my environment. They won't animate continuously, and no I don't have any blank space at the end of my animation, so that's ruled out. I added into my program the ability to control one of the birds, like a player. When I do this the bird animates fine. When it controls itself the problem is there....ALSO my forward and backward controls for my main character stop working after a couple of minutes which I can't figure out either. Does it everytime too after a few minutes of play.
Here's what I have of my little program I'm working on. Too much to upload the Media epsecially since I'm on 56k. Only about 7MB total but like I said...56k..lol
Randomize timer()
set display mode 800,600,32
set ambient light 15
`Load Screen
sync on
sync
sync rate 0
set cursor 350,300
print "Loading..."
sync
`NGC Stuff
#Constant NCULL_COUNTER_CLOCK 1
#Constant NCULL_CLOCK 2
#Constant NCULL_NONE 3
#Constant TYPE_NGC_ELLIP=1
#Constant TYPE_NGC_MESH=2
#Constant ELLIP_2_ELLIP=1
#Constant ELLIP_2_POLY=2
#Constant RESP_STICK=1
#Constant RESP_SLIDE=2
#Constant RESP_SLIDE_NO_SLOPES=3
#Constant RESP_SLIDE_NO_GRAV=4
#Constant RESP_SLIDE_NO_ACCEL=5
#Constant RESP_NONE=6
#Constant DYN_NO_RESP=1
#Constant DYN_RESP=2
#Constant DYN_RESP_NOTURN=3
StartCollisionPRO(000000000,000000000,000000000)
StartCollisionDebugPRO()
SetCollisionExclusive( 1 )
#constant PONE = 1
#constant WORLD1 = 2
#constant TREE = 3
#constant TREE2 = 4
#constant SHACK = 5
SetCollisionsPRO(PONE, WORLD1, ELLIP_2_POLY, RESP_SLIDE, DYN_RESP,0)
SetCollisionsPRO(PONE, TREE, ELLIP_2_POLY, RESP_SLIDE_NO_GRAV, DYN_RESP,0)
SetCollisionsPRO(PONE, SHACK, ELLIP_2_POLY, RESP_SLIDE, DYN_RESP,0)
`Load Objects
GOSUB LoadObjects
`Camera Range
set camera range 10,10000
`Timer For Birds
birdie=0
`Set Starting View To Player
playerview=1
`Array/Variables For Storing World Coords Into A txt File
Dim WorldCoords$(10)
currentcoord=0
coordcount=30
Ready$="Yes"
`Player Gravity
SetObjGravityPRO(2,2.0 )
`**********START MAIN LOOP**********
`***********************************
DO
`Print Info To Screen
text 10,10,"Screen FPS:"+str$(screen fps())
text 10,30,"X: "+str$(object position x(2))
text 10,50,"Y: "+str$(object position y(2))
text 10,70,"Z: "+str$(object position z(2))
text 10,90,Ready$
`Timers
inc birdie,1
inc coordcount,1
`position object 2,playerx,object position y(1)+16,playerz
if coordcount < 60
Ready$="Not Ready To Add Coordinate"
else
Ready$="Ready To Add Coordinate"
endif
`If Player's in Shack Then play the Shack Animation
if object position x(2)> 1549 and object position x(2)<1651 and object position z(2)<624 and object position z(2) > 542 and board = 0
set object speed 21,1000
play object 21
board = 1
endif
`Temp
if object position x(6) > 2500 or object position x(6) < -2500 or object position z(6) > 2500 or object position z(6) < -2500
YRotateObjectPRO(6,wrapvalue(object angle y(6))+100)
endif
if object position x(6) > 1516 and object position x(6) < 1680 and object position z(6) < 631 and object position z(6) > 527
YRotateObjectPRO(6,wrapvalue(object angle y(6))+100)
endif
`Move The Birds Around
GOSUB MoveBirds
if birdie = 250 then GOSUB RotateBirds
if birdie > 275 then birdie=0
`Write Coordinates To Coord.txt for reference of placing objects
if inkey$()="c" and coordcount > 60
WorldCoords$(currentcoord)=str$(playerx) + "," + str$(playery) + "," + str$(playerz)
save array "coords.txt",WorldCoords$()
coordcount = 0
inc currentcoord,1
endif
`Press B for BirdView. (Used To Check Bird's Movement)
if keystate(48)=1 then playerview = 0
`Press P for PlayerView
if inkey$()="p" then playerview = 1
`View Set to PlayerView
if playerview = 0
SET CAMERA TO FOLLOW birdx,birdy+70,birdz,wrapvalue(object angle y(6)),25,6,6,1
endif
`View Set to BirdView
if playerview = 1
SET CAMERA TO FOLLOW playerx,playery+19,playerz,wrapvalue(object angle y(2)),70,6,6,1
endif
`Move Player Around
`†NOTE† Up/Down Stop Functioning After A Couple of Minutes
`Birds Sometimes Stop Forward Movement As Well But Still Rotate
if playerview=1
if upkey()=1 then moveobjectpro(2,3)
if downkey()=1 then moveobjectpro(2,-3)
if leftkey()=1 then YRotateObjectPRO(2,wrapvalue(object angle y(2)-5))
if rightkey()=1 then YRotateObjectPRO(2,wrapvalue(object angle y(2)+5))
endif
`Move Bird
if playerview=0
if upkey()=1 then moveobjectpro(6,3)
if downkey()=1 then moveobjectpro(6,-3)
if leftkey()=1 then YRotateObjectPRO(6,wrapvalue(object angle y(6)-5))
if rightkey()=1 then YRotateObjectPRO(6,wrapvalue(object angle y(6)+5))
endif
RunCollisionPRO()
`Player's Positions
playerx=object position x(2)
playery=object position y(2)
playerz=object position z(2)
`Bird's Positions
birdx=object position x(6)
birdy=object position y(6)
birdz=object position z(6)
sync
LOOP
`**********END MAIN LOOP**********
`***********************************
`Move The Birds and Prevent Going Through Certain Objects
`As Well As Leaving The World
MoveBirds:
for x = 7 to 20
if object position x(x) > 2500 or object position x(x) < -2500 or object position z(x) > 2500 or object position z(x) < -2500
YRotateObjectPRO(x,wrapvalue(object angle y(x))+100)
endif
if object position x(x) > 1516 and object position x(x) < 1680 and object position z(x) < 631 and object position z(x) > 527
YRotateObjectPRO(x,wrapvalue(object angle y(x))+100)
endif
moveobjectPRO(x,3)
next x
return
`Rotate The Birds
RotateBirds:
for x = 7 to 13
YRotateObjectPRO(x,wrapvalue(object angle y(x)+RND(40)+20))
next x
for x = 14 to 20
YRotateObjectPRO(x,wrapvalue(object angle y(x)+RND(40)-20))
next x
Return
`Load Objects
LoadObjects:
load object "Media\abc.x",1
CollisionTypePRO(1, WORLD1)
`Player
make object cube 2,24
PositionObjectPRO(2,20,17,45)
CollisionTypePRO(2, PONE)
SetObjRadiusPRO( 2, 23, 23, 23 )
`Character Model Not Yet Used
`load object "Media\char.x",2
`PositionObjectPRO(2,20,0,45)
`CollisionTypePRO(2, PONE)
`SetObjRadiusPRO(2, 7, 15, 7)
`Rotate Object 2,0,180,0
`Fix Object Pivot 2
load object "Media\skya.x",3
PositionObjectPRO(3,0,0,0)
load object "Media\tree4.x",4
PositionObjectPRO(4,400,0,400)
CollisionTypePRO(4, TREE)
clone object 5,4
PositionObjectPRO(5,1200,0,1200)
CollisionTypePRO(5, TREE)
load object "Media\bird.x",6
rotate object 6,0,90,0
fix object pivot 6
PositionObjectPRO(6,0,10,0)
`CollisionTypePRO(6, PONE)
Rem Make Copies of Birds
for x = 7 to 20
instance object x,6
rotate object x,0,90,0
fix object pivot x
next x
load object "Media\shack.x",21
PositionObjectPRO(21,1600,1,589)
CollisionTypePRO(21, SHACK)
load object "Media\tree2.x",22
PositionObjectPRO(22,589,0,742)
CollisionTypePRO(22, TREE)
load object "Media\tree3.x",23
PositionObjectPRO(23,-836,0,-459)
CollisionTypePRO(23, TREE)
clone object 24,23
PositionObjectPRO(24,1602,0,487)
CollisionTypePRO(24, TREE)
clone object 25,4
PositionObjectPRO(25,-431,0,-1036)
CollisionTypePRO(25, TREE)
clone object 26,4
PositionObjectPRO(26,-109,0,-2155)
CollisionTypePRO(26, TREE)
load object "Media\headstone.x",27
PositionObjectPRO(27,-958,0,1879)
CollisionTypePRO(27, TREE)
Rem Place HeadStones for GraveYard
pos=-858
for f = 28 to 31
clone object f,27
PositionObjectPRO(f,pos,0,1879)
CollisionTypePRO(f, TREE)
inc pos,100
next f
pos=-958
for f = 32 to 36
clone object f,27
PositionObjectPRO(f,pos,0,1979)
CollisionTypePRO(f, TREE)
inc pos,100
next f
Rem Animate Birds
loop object 6
set object speed 6,350
board=0
Rem Random Placement of Birds
for x = 7 to 13
PositionObjectPRO(x,RND(2300),RND(5),RND(2300))
next x
for x = 14 to 20
PositionObjectPRO(x,RND(2300)-2500,RND(5),RND(2300)-2500)
next x
return