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.

3 Dimensional Chat / How do I get my 3d anim to change speed of movement around screen in DBC

Author
Message
D18AGON
21
Years of Service
User Offline
Joined: 25th Sep 2004
Location:
Posted: 26th Sep 2004 20:35
Hi, I have some code here and I would like to know how to change the speed at which my animation moves across the screen when I press arrow key. Also how fast the anim itself plays, where and what do I put in this code to do this? I tried playing around with the set object speed code but it didn;t change anything, how do I make this work?

rem Position camera off center
POSITION CAMERA 0.0,0.0,-1000.0

rem Load 3D object and append walking data to it
LOAD OBJECT "bruce standing wb.x",1 : APPEND OBJECT "bruce walking
wb.x",1,100
YROTATE OBJECT 1,180 : FIX OBJECT PIVOT 1

rem Loop 3D object animation from 0 to 20 (idle)
LOOP OBJECT 1,0,10 : SET OBJECT SPEED 1,50

rem Activate manual syncronization
SYNC ON

rem Begin loop
DO

rem Modify character angle based on left/right keys
stage=0
IF LEFTKEY()=1 THEN a#=a#-8.0
IF RIGHTKEY()=1 THEN a#=a#+8.0
a#=wrapvalue(a#)

rem Modify character position based on up/down keys
IF UPKEY()=1 THEN x#=NEWXVALUE(x#,a#,3) : z#=NEWZVALUE(z#,a#,3) : stage=1
IF DOWNKEY()=1 THEN x#=NEWXVALUE(x#,a#,-3) : z#=NEWZVALUE(z#,a#,-3) : stage=1

rem If character action changes
IF stage<>oldstage
IF stage=0
SET OBJECT FRAME 1,0.0
LOOP OBJECT 1,0,20
SET OBJECT SPEED 1,100
ENDIF
IF stage=1
SET OBJECT FRAME 1,105.0
LOOP OBJECT 1,105,125
SET OBJECT SPEED 1,100
ENDIF
oldstage=stage
ENDIF

rem Update character position and angle
POSITION OBJECT 1,x#,0.0,z#
YROTATE OBJECT 1,a#

rem Refresh screen
SYNC

rem End loop
LOOP


Plz give example.
D18AGON
21
Years of Service
User Offline
Joined: 25th Sep 2004
Location:
Posted: 27th Sep 2004 17:45
Don't worry, I've worked it out, problem now is the object loads up off to the right back off the Y axis causing the object to turn in a big circle way over to the side of the object rather than on the spot when i press left and right keys, that is the object won't turn on it's virticle center, the center has been pulled way over to the side of the object and it's rotating around that, this is a big problem what can I do to fix this, Plz give egg.
D18AGON
21
Years of Service
User Offline
Joined: 25th Sep 2004
Location:
Posted: 28th Sep 2004 14:48
Hey I worked this out now, something i had to do in 3d canvis, so simple.

Login to post a reply

Server time is: 2026-07-08 18:15:04
Your offset time is: 2026-07-08 18:15:04