Page 1 of 1

I'm stumped...

Posted: Thu Sep 20, 2007 11:42 pm
by *Boinkage*!
After searching for a while, I am unable to find something on this problem. I created a physics driver named

physics
name 1
linear 0.0 0.0 0.0
angular 0.0 0.0 0.0
slide 0.0
death dont touch
end

and

meshbox
name deathbox
position 0 0 0
rotation 0
size 10 400 500
phydrv 1

When I run bzfs, it says

Couldn't find physics driver: 1 (or whatever I call it)
Any clue why?

Posted: Thu Sep 20, 2007 11:44 pm
by Tanner
Hi,

Try renaming the physics driver to a non-numerical name (like "a"). That will work.

-Tanner

Posted: Thu Sep 20, 2007 11:47 pm
by Macrosoft
EDIT: never mind, tanner beat me to it

try changing the name to a string without numbers:

Code: Select all

physics
 name cantTouchThis
 linear 0 0 0
 angular 0 0 0
 slide 0
 death dont touch
end

meshbox
 name deathbox
 position 0 0 0
 rotation 0
 size 10 400 500
 phydrv cantTouchThis
end
by the way, you can omit parameters like rotation, linear, angular and slide if you arent using them.

Posted: Thu Sep 20, 2007 11:54 pm
by Peter
Also, you don't need all that other stuff, this works fine as a physics death..

Code: Select all

physics
name GOAT!
death CAMEL!
end
I found out that you couldn't name physics with numbers the hard way :|
I think the same goes for other stuff like textures.

Posted: Fri Sep 21, 2007 12:11 am
by *Boinkage*!
I am using something different (just an example). I'll try the different stuff, then edit when I finish

My last attempt will probably to copy that code exactly and see if it works.

EDIT: A copy and paste worked, I'm trying to figure out why. Does it matter where I put the physics name? It WAS at the bottom, now it's above the deathwall.

Posted: Fri Sep 21, 2007 1:09 am
by blast
Yeah, probably has to be defined before you use it.

Posted: Fri Sep 21, 2007 10:04 am
by Spazzy McGee
If you want to call phydrvs by number, they start at 0, not 1. And you don't need to define that as a name - it just goes in the order of phydrvs in the map file.

If you ask me, it's always way easier to name your phydrvs and textures something descriptive. For example i might use 'electricity-death' for a phydrv, or 'fence-barbs' for a texture.

Posted: Sat Sep 22, 2007 6:47 pm
by XLR8
Yes, I am positive that you have to define all the materials and physics and all that good stuff before you define the object that uses that material. I had that same problem you have until I moved all my physics and materials to the very top of the document, or at least before the object that uses the material/physics.