hi everyone,
i bought darkmatter 2 and have been trying to get a model to walk when i press the upkey although with little luck. the idea is that if the upkey is not pressed the idle animation is pressed and whilst the upkey is pressed the walk animation is used, see animation frames
000 : Stance
000 - 080 : Idle Posture
080 - 150 : Fidget Animation
150 - 200 : Attack (170 Impact)
200 - 250 : Hurt (220 Impact)
250 - 300 : Block/Dodge (270 Impact)
300 - 350 : Stagger
350 - 400 : Collapse/Die (370 Impact)
450 - 500 : Get Up
450 - 550 : Walk
: 450-470 - Position To Loop
: 470-530 - Looping Walk
: 530-550 - Return To Stance
550 - 650 : Run
: 550-570 - Position To Loop
: 570-630 - Looping Run
: 630-650 - Return To Stance
the animations work if a simple loop object 10 command is used, and this loops through all the frames, however when loop object 10, and two frames are specified nothing seems to happen.
Sync On
Sync Rate 30
Rem make matrix
Make matrix 1,10000,10000,20,20
Rem texture matrix
Load image "grass2.jpg",1
Prepare matrix texture 1,1,1,1
Fill matrix 1,0,1
Rem Make player pawn
Load object "agent.x",10
xrotate object 10,270
position object 10,100,0,100
fix object pivot 10
set object speed 10,6400
rem Randomize the matrix
randomize matrix 1,125
Rem Main loop
Do
set cursor 0,0
print screen fps()
Rem Store Object angle
AngleY# = object angle Y(10)
if upkey()=0
play object 10,1,150
endif
Rem Control input for camera
If Upkey()=1
XTest# = Newxvalue(X#,AngleY#,20)
ZTest# = Newzvalue(Z#,AngleY#,20)
If XTest#>0 and XTest#<10000 and ZTest#>0 and ZTest#<10000
Move object 10,10
loop object 10,470,530
Endif
Endif
If Leftkey()=1 then Yrotate object 10,Wrapvalue(AngleY#-5)
If Rightkey()=1 then Yrotate object 10,Wrapvalue(AngleY#+5)
X# = Object position x(10)
Z# = Object position z(10)
Y# = Get Ground Height(1,X#,Z#)
Position object 10,X#,Y#+12.5,Z#
CameraZ# = Newzvalue(Z#,AngleY#-180,100)
CameraX# = Newxvalue(X#,AngleY#-180,100)
CameraY# = Get Ground Height(1,CameraX#,CameraZ#)
Position camera CameraX#,CameraY#+100,CameraZ#
Point camera X#,Y#+60,Z#
Rem Refresh Screen
Sync
Loop
the object speed is set the same as the darkmatter viewer. has anyone else got something simple like this working, with other things such as pressing space bar plays the shoot animation etc,
thanks for your help