Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / looping and stopping and object anim

Author
Message
acurrate eye
15
Years of Service
User Offline
Joined: 28th Aug 2009
Location: ur house under your pillow was under bed
Posted: 12th Nov 2009 22:50 Edited at: 13th Nov 2009 22:02
i am having a problem with looping and animating and obj from dgk which i used to use no dbpro any way here is my code using codesurge my cp is to old lol colonel-x.x
edit the object when pressed up and down key it keeps looping non stop

if upkey()=1 then move object 1,-3
if upkey()=1 then loop object 1,300,318
if downkey()=1 then move object 1,3
if downkey()=1 then loop object 1,300,318
if leftkey()=1 then turn object left 1,3
if rightkey()=1 then turn object right 1,3

if you can't do it try try again and if you still cant do it ask for help
acurrate eye
15
Years of Service
User Offline
Joined: 28th Aug 2009
Location: ur house under your pillow was under bed
Posted: 13th Nov 2009 22:33
ok found it out here it is

Function MovePlayer()
If UpKey() = 1
Set Object Speed objn,speed
Move Object objn,speed
Loop Object objn,235,259
EndIf

If DownKey() = 1
Set Object Speed objn,speed
Move Object objn,speed
Loop Object objn,frame1,endframe
EndIf
If upkey()=0 and downkey()=0 then stop object objn
if leftkey()=1 then Turn Object Left objn,angle
if rightkey()=1 then Turn Object Right objn,angle
EndFunction

thank you to those who also needed help and was answered it helped me

if you can't do it try try again and if you still cant do it ask for help

Login to post a reply

Server time is: 2024-09-28 12:28:17
Your offset time is: 2024-09-28 12:28:17