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.

DarkBASIC Discussion / The play object command...

Author
Message
Blazer
21
Years of Service
User Offline
Joined: 22nd Oct 2002
Location: United States
Posted: 16th Feb 2003 00:52
I want it so when I hold down the up button, my guy starts to walk, the starts a differt section of the animation.

I'v achevied this:

if upkey()=1 then play object 1,1,2
if upkey()=1 and object frame(1)=2 then loop object 1,3,6

the only problem is, when I hold down the button the guy just sits there, but when I let go then he moves. Can I get him to play while I hold down up? plese help
As I walk through the vally of the shadow of death, I will fear no evil.
- Psalms 23:4
cusoi
21
Years of Service
User Offline
Joined: 3rd Jan 2003
Location: Netherlands
Posted: 16th Feb 2003 20:54
I think you can do this.

do
if upkey()=1 and a=0
loop object 1
a=1
endif
if upkey()=0 and a=1
stop object 1
a=0
endif
loop

I hope this is helpfull to you.

Current project: Earth Chaos, a FPRTS
Blazer
21
Years of Service
User Offline
Joined: 22nd Oct 2002
Location: United States
Posted: 16th Feb 2003 21:52
thanks but that brings up another problem, for some reson when I use the loop objuect command it plays through alll the animation frames, then it loops the ones i want. Is there a way to stop this? (no i do not have the play obejct command in front of my loop)

As I walk through the vally of the shadow of death, I will fear no evil.
- Psalms 23:4
Kentaree
21
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 17th Feb 2003 00:14
Yeah, you can use
loop object objectno,startingframe,endingframe.

Otherwise,you could use


Whatever I did I didn't do it!
hexGEAR
21
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Naytonia
Posted: 17th Feb 2003 01:20
if you have the exanples, check under 3D that walks, thats a perfect example on how to animate walking in DB, theres also a set object command that sets the frame directly to what u want instead of looping through each frame till it gets to the one u want, hope that helped ^_^

your birth was a blessing, sent to live and die on earth as a lesson, we each have a star all you have to do is find it, once you do, everyone who sees it will be blinded - DMX
Blazer
21
Years of Service
User Offline
Joined: 22nd Oct 2002
Location: United States
Posted: 17th Feb 2003 05:54
thanks i got it

As I walk through the vally of the shadow of death, I will fear no evil.
- Psalms 23:4

Login to post a reply

Server time is: 2024-05-19 19:28:47
Your offset time is: 2024-05-19 19:28:47