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 / spinning cubes

Author
Message
Ultimate Newbie
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location:
Posted: 27th Sep 2005 21:57
Is there anyone out there that can tell me how to isolate one face of a cube? I want to colour it randomly and shoot at it whilst it is spinning on both x and y axes simultaneously. Is this very difficult, or am I just being thick?
master programmer
19
Years of Service
User Offline
Joined: 30th May 2005
Location: 3D Space
Posted: 28th Sep 2005 07:53
You could create a cube in like milkshape or something and then paste a plain the size of one face and use that plain as the face. That's as good as I could think of.

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 28th Sep 2005 13:42
On a simlar line, you can use a standard cube and a standard plain. Glue the plain to the cube, and you can then use object collision on it.

master programmer
19
Years of Service
User Offline
Joined: 30th May 2005
Location: 3D Space
Posted: 29th Sep 2005 08:06
How would you glue to the cube? Everytime I tried glue object to limb on a DB created object (like cube, sphere, etc) it says "Limb does not exist". When I try to rig a limb together it still says "limb does not exist," so, I think a free trial of Milkshape should suffice for just a cube

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 29th Sep 2005 12:54
I think the help files are back to front on this one. Try moving the parameters around.

Me!
19
Years of Service
User Offline
Joined: 26th Jul 2005
Location:
Posted: 29th Sep 2005 13:51 Edited at: 29th Sep 2005 13:54
ya! helpfiles are back to front, plus it sometimes messes the objects up unless they are made from meshes, but for a simple cube it works ok, the correct format is

glue object to limb [thing you are glueing to object],[object that gets thing glued to],0

limb number is usualy zero unless you are attaching a gun to an NPC`s arm or a 3rd person player to a car or something, code...

make object cube 1,1
make object plain 2,1,1
color object 2, rgb(255,0,0)
position object 2,0,0,-0.51
glue object to limb 2,1,0
do
turn object left 1,1
loop

I positioned the plain a little above the face of the cube to prevent z buffer fighting.


why do they say Aliens are gonna be friendly?, surely the agressive ones wipe out the peaceloving ones, so all you have left out there are crazed flesh eating interstellar monsters.
master programmer
19
Years of Service
User Offline
Joined: 30th May 2005
Location: 3D Space
Posted: 30th Sep 2005 08:14
But using that then the plain is positioned directly inside the cube and not on one of the faces! I think the correct way to do it is with Milkshape! It's free! Make a simple cube on it and save it as a .3ds or .x and there you have it! Then you know the name of the limbs and don't have to mess around in DB to get it perfectly right!

Yes, yes, the glue object on command would work, but, it would only glue the plain to the center of the object, which was my problem when giving character's weapons. THE BEST SOLUTION IS MILKSHAPE OR A 3D MODELING PROGRAM!

Me!
19
Years of Service
User Offline
Joined: 26th Jul 2005
Location:
Posted: 30th Sep 2005 10:15
Quote: "it would only glue the plain to the center of the object"



WOT?...did you run the above code?, the plain is not at the center of the object, its on one face, you position the object before you glue it



why do they say Aliens are gonna be friendly?, surely the agressive ones wipe out the peaceloving ones, so all you have left out there are crazed flesh eating interstellar monsters.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 30th Sep 2005 12:53
Me! is correct.
The only outstanding issue with gluing objects is when you unglue them, the position jumps to the centre of the parent object. But in this scenario, that's irrelevant.

And for the record, Milkshape is not free. Unless you're trying to tell us something you maybe shouldn't

Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 30th Sep 2005 20:03


The cube has 6 limbs: the 6 faces. I don't really get actually why the faces sometimes turn grey...

Immunity and Annihalation makes Immunihalation...
Antidote
19
Years of Service
User Offline
Joined: 18th Mar 2005
Location: San Francisco, CA
Posted: 2nd Oct 2005 20:25
Quote: "do it is with Milkshape! It's free!"


Milkshape isn't free. Modeling is not the best way. Coding is better because you don't have to worry about any odd kind of conversion errors that can spontaneously occur.

Formerly known as SFLM.
Ultimate Newbie
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location:
Posted: 3rd Oct 2005 21:44
re spinning cubes.
Thanks for everyone's input. I didn't realise that I'd start such a debate. I'm trying eveyone's suggestion, and I'll post it when I find out which one works.
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 4th Oct 2005 08:50 Edited at: 4th Oct 2005 08:52
You can also make each side of the cube it's own limb and use limb commands to recolor/retexture the desired limb/side. Here is some code I posted a long while ago that may help.



[edit] This is the longer version of the code they had me post to make it easier to understand. It can be shortened a great bit I believe if need be.

Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 5th Oct 2005 22:25
Lost in Thought,

Why is everyone ignoring my post? 6 limbs: one object...



Immunity and Annihalation makes Immunihalation...
Ultimate Newbie
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location:
Posted: 6th Oct 2005 18:28
I've tried it and it works very well. Thanks
Ultimate Newbie
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location:
Posted: 6th Oct 2005 18:48
It's the thicky again.
Why is it that when I try to create another object "a cylinder", even though I give it another identifying number from the spinning cube, it keeps saying "object already exists"?
master programmer
19
Years of Service
User Offline
Joined: 30th May 2005
Location: 3D Space
Posted: 7th Oct 2005 08:36
There's a free trial version of milkshape, you could create one cube with faces and save it before your trial is up and there you go. Presto.

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 7th Oct 2005 10:48
The object already exists message is accurate, no known issues with it. You really must have duplicated an object number.

IF OBJECT EXIST() will return a value of 1 if...the object exists! That may help you work out your problem. You could also combine it with POINT CAMERA to get a visual on the object giving you grief and work it out.

Me!
19
Years of Service
User Offline
Joined: 26th Jul 2005
Location:
Posted: 7th Oct 2005 17:52
dont forget there is a plain object glued to the cube (object 2), otherwise the object function has no problem, if it says you have an object already then you have an object with that number somewhere.



why do they say Aliens are gonna be friendly?, surely the agressive ones wipe out the peaceloving ones, so all you have left out there are crazed flesh eating interstellar monsters.
Ultimate Newbie
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location:
Posted: 7th Oct 2005 18:05
re spinning cubes.
Thank you everyone. My mega game is under construction once more.
Give me about a decader or so and I'll post it.
Ultimate Newbie
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location:
Posted: 8th Oct 2005 16:07
Would someone please, please tell me why this code isn't working.
I get the spinning cube but not the "gun" or the bullet. What passes for my brain just cannot work it out.
Ultimate Newbie
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location:
Posted: 9th Oct 2005 03:01
I'll try that again. somehow the code didn't attach itself the last time.
Ultimate Newbie
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location:
Posted: 9th Oct 2005 04:10
If it doesn't work this time I'm going to bite my own head off.

hide mouse
`sync on :sync rate 80
load music "music fun.mp3" ,1 :loop music 1
`load image "rocky.bmp",2

`MAKE SPINNING CUBE
make object cube 1,1
make object plain 2,1,1
color object 2, rgb(255,0,0)
position object 2,0,0,-0.51
glue object to limb 2,1,0

xrotate object 1,object angle x(1)+1
yrotate object 1,object angle y(1)-1


`MAKE GUN
make object cylinder 3, 0.5
color object 3,rgb(0,255,255)
scale object 3,50,100,100
position object 3,0,-4,8

`MAKE BULLET
make object sphere 4,0.5
position object 4,0,-4,8
do
position camera 0,0,4
point camera 0,-1,0

loop
Peter H
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 11th Oct 2005 20:07
attach it using the "code" tags...

like this (take out the '*'s)
[*code]Your Code here[*/code]

"We make the worst games in the universe."

TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 13th Oct 2005 06:31
Are you using a matrix?

If so,

position object 3,0,-4,8

will place the gun below ground level.

TDK_Man

Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 13th Oct 2005 10:37
Don't forget to use "lock object on nr" command

Immunity and Annihalation makes Immunihalation...

Login to post a reply

Server time is: 2024-09-24 05:16:58
Your offset time is: 2024-09-24 05:16:58