Help with destruction option

Questions and answers about the how and why of making maps.
Post Reply
User avatar
ducatiwannabe
Private First Class
Private First Class
Posts: 3258
Joined: Tue Aug 10, 2004 3:55 pm
Location: Planet Earth
Contact:

Help with destruction option

Post by ducatiwannabe »

I have seen servers and maps for 2.0 with objects that when you touch them, you'd die. I'd really like to know how to do this!

I'm testing using this object on a map, tell me how and I'll see if it works please!

pyramid
name Pyramid
position 0 0 0
rotation 0
size 400 400 1
end
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Post by JeffM »

you can't do it to a normal pyrmaid.
physics drivers are only available on mesh faces.
a old school pyrmaid object is not a mesh face.

from the bzw man page ( www.bzflag.org -> geting help ),
we see that you just have to define a driver, then apply it to an object.

# define a driver for pure, unfiltered DEATH!!!!
physics
name death_by_bumping
death got blowed up like a punk.
end

# make the pyramid of D00M
meshpyr
name Pyramid
phydrv death_by_bumping
position 0 0 0
rotation 0
size 10 10 10
end

basicly for any mesh based object, that you want to have death like properies, just add the "phydrv death_by_bumping" line.

If you want difrent death messages for difrent objects, just make one driver pre message.
ImageJeffM
User avatar
ducatiwannabe
Private First Class
Private First Class
Posts: 3258
Joined: Tue Aug 10, 2004 3:55 pm
Location: Planet Earth
Contact:

Post by ducatiwannabe »

It says "Could not find phydrive "death_by_bumping" error"
User avatar
ducatiwannabe
Private First Class
Private First Class
Posts: 3258
Joined: Tue Aug 10, 2004 3:55 pm
Location: Planet Earth
Contact:

Post by ducatiwannabe »

never mind thanks!
User avatar
ducatiwannabe
Private First Class
Private First Class
Posts: 3258
Joined: Tue Aug 10, 2004 3:55 pm
Location: Planet Earth
Contact:

Post by ducatiwannabe »

Well I think I almost got it, but now the pyramid is gone :(

physics
name death_by_bumping
death got blowed up like a punk.
end

meshpyr
name Pyramid
phydrv death_by_bumping
position 0 0 8
rotation 0
size 400 400 0
end
User avatar
ducatiwannabe
Private First Class
Private First Class
Posts: 3258
Joined: Tue Aug 10, 2004 3:55 pm
Location: Planet Earth
Contact:

Post by ducatiwannabe »

This is really getting annoying and emberassing :oops:

All I want is an object (indication of water) so that you fall on it you die.

Example:

pyramid
name Pyramid
position 0 0 8
rotation 0
size 400 400 0
end

It covers the whole map there like a water, and if you fall in you die :/

I dont mean to be a bother, I'm still new to this 2.0 stuff.
trepan
Dev Wizard
Dev Wizard
Posts: 704
Joined: Fri Feb 21, 2003 7:50 pm

Post by trepan »

try changing the Z size to a non-zero number.
[ size 400 400 1 ]
mesh obstacles do not like 0 sized dimensions,
and will discard them. the code should produce
a warning, but it currently doesn't (my bad)

If you want to use 0 sized dimensions with meshes,
then you will have to use a mesh face rather then
a full mesh object.
User avatar
ducatiwannabe
Private First Class
Private First Class
Posts: 3258
Joined: Tue Aug 10, 2004 3:55 pm
Location: Planet Earth
Contact:

Post by ducatiwannabe »

Ok this is what I have so far..but it still isn't working:

pyramid
name Pyramid
position 0 0 8
rotation 0
size 400 400 1
drivethrough
end

physics
name death
death Don't fall in the water!
end

meshpyr
name Pyramid
position 0 0 8
size 400 400 1
phydrv death
end
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Post by JeffM »

make it a mesh face, like a single square, not a pyramid. Don't try to fake it when you have the proper tools.

Just make a square with 4 versts at the z level you want.
ImageJeffM
User avatar
ducatiwannabe
Private First Class
Private First Class
Posts: 3258
Joined: Tue Aug 10, 2004 3:55 pm
Location: Planet Earth
Contact:

Post by ducatiwannabe »

I got it I got it thanks Jeff! :slick: :slick: :slick:
Post Reply