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 Professional Discussion / Dark Matter - Animating a .x Model

Author
Message
Mk II
15
Years of Service
User Offline
Joined: 9th Oct 2010
Location:
Posted: 22nd Dec 2010 12:44
Maybe I'm missing something incredibly simple, but I honestly can't find out how I'm supposed to animate these models.

First off a friend provided the models for me so I don't have the manual, and he couldn't find out anything either.

The files I have are:

H-Police Car-Move.X - 134 KB
L-Police Car-Move.X - 64 KB
policeCa.DDS

I'm currently loading the H-Police object and texturing it with the DDS file. I'm currently doing nothing with the L-Police file.

The product page is
http://www.thegamecreators.com/?m=view_product&id=2104&page=dm1

The information for the Police car is Police Car

Objects Vertices Faces Animations High or Low poly model?
5 854 700 M (move) Both

I know it's something to do with frames, but wouldn't know how to go about it.

I hope the information is clear enough for an answer, thanks.
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 22nd Dec 2010 16:01
"set object frame" or "loop object" or "play object" should get you started

Drillfoot
15
Years of Service
User Offline
Joined: 7th Aug 2010
Location: United States
Posted: 23rd Dec 2010 04:45
Not to sound like an internet lawyer. But.. Those models are part of "DarkMATTER". Your friend has a right to use them in as many of his OWN projects. Giving them out is not part of the license.

On your topic.
You will load your model using

` LOAD MODEL, SET X,Y AND FRAME RATE
LOAD OBJECT "H-Police Car-Move.X", 1 ` your mesh and mesh #
POSITION OBJECT 1, 0 , 0 , 0
XROTATE OBJECT 1, -90 ` rotate your mesh on the 'x' axis
YROTATE OBJECT 1, 90 ` rotate your mesh on the 'y' axis
SET OBJECT SPEED 1, 6000 ` animate your mesh
LOOP OBJECT 1

` ENSURE CAMERA IS POINTED AT THE MESH
CY = OBJECT SIZE Y(1)/2
POSITION CAMERA 100, cy, -200
point camera 0, cy, 0


Ultimatley to animate your model, your going to have to set keyboard keys, or mouse functions to it. The DarkMATTER collection does have an idle frame set. But a Police Car at idle would be just a sound. As a cartoon character, or enemy might 'fidget' after a set amount of time.

rem allow user create game with one click
rem create graphics, sound, scripts, models, with one click
rem slap user in face if game choice is mmo
Drillfoot
15
Years of Service
User Offline
Joined: 7th Aug 2010
Location: United States
Posted: 23rd Dec 2010 06:02
Fixed the code above for ya. Hope it helps a bit. This has the camera facing the rear of the police car.

The 'Wait Key' is only there so you can see the example..
` LOAD MODEL, SET X,Y AND FRAME RATE
LOAD OBJECT "l-Police Car-Move.X", 1 ` your mesh and mesh #
POSITION OBJECT 1, 0 , 0 , 0
XROTATE OBJECT 1, 10 ` rotate your mesh on the 'x' axis
YROTATE OBJECT 1, 40 ` rotate your mesh on the 'y' axis
SET OBJECT SPEED 1, 6000 ` animate your mesh
LOOP OBJECT 1

` ENSURE CAMERA IS POINTED AT THE MESH
CY = OBJECT SIZE Y(1)/2
POSITION CAMERA 5, cy, 5
point camera 0, cy, 0
wait key

If you are wanting to move the Police car. You will need to assign keys to the specific car. You will also have to set its speed, and what not as well. Hope this helps a bit.

rem allow user create game with one click
rem create graphics, sound, scripts, models, with one click
rem slap user in face if game choice is mmo
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 23rd Dec 2010 10:25
Quote: "Not to sound like an internet lawyer. But.. Those models are part of "DarkMATTER". Your friend has a right to use them in as many of his OWN projects. Giving them out is not part of the license."

I missed that part. Yes, you really shouldn't be using these in your project unless you have proof of purchase yourself. TGC will not be happy if you are using an illegal copy of their product...

DVader
22
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 29th Dec 2010 13:32
You might want to check out the gamestore it has a few free models available on it, as well as cheap ones to buy.

http://s6.bitefight.org/c.php?uid=103081

Login to post a reply

Server time is: 2026-07-18 07:33:03
Your offset time is: 2026-07-18 07:33:03