one-way drive through walls
- big_daddy2
- Private First Class
- Posts: 131
- Joined: Sat May 06, 2006 1:06 am
- Location: the middle of nowhere, USA
one-way drive through walls
i have has this on my mind and was wondering how to do this
Dude, you asked this on IRC a few weeks ago, I guess you didn't take my advice.
Here it is again...
http://my.bzflag.org/w/Mesh
Here it is again...
http://my.bzflag.org/w/Mesh
- A Meteorite
- Private First Class
- Posts: 1786
- Joined: Thu Apr 28, 2005 12:56 am
- Location: California, U.S.
- Contact:
No, meshboxes can not do that.Tedius wrote:For those of us who code by hand, is there anyway to do this with a meshbox?
And you can make meshes by hand, there is nothing keeping you from learning mesh syntax and how to make faces, vertices, etc in BZW code. Editors (such as Blender and Wings3D) just exist to make it easier.
Owner @ BZFX
Core Admin @ CAN
Email me: bzmet…@gmail.com
-
- Private First Class
- Posts: 220
- Joined: Tue Jul 26, 2005 10:32 pm
- Location: Gainesville Florida
i can't see what big daddy 2 was talking about, however, if you want to make an object that you can drive into and shoot out of, just make a 'box' for instance and make it 'drivethrough'. you can drive into it and shoot out but noone can shoot in.
Tedius: this should work for a meshbox as well. I have done this on one of my maps, I learned it from public servers. I can't recall which ones.
I you just want a simple one way drive through wall then do what legolas and A Meteorite said.
Tedius: this should work for a meshbox as well. I have done this on one of my maps, I learned it from public servers. I can't recall which ones.
I you just want a simple one way drive through wall then do what legolas and A Meteorite said.
- A Meteorite
- Private First Class
- Posts: 1786
- Joined: Thu Apr 28, 2005 12:56 am
- Location: California, U.S.
- Contact:
Meshboxes are just a glorified box with matref and physics support. You can not define faces on a meshbox which is required to make something one-way (see: http://my.bzflag.org/w/Meshbox ).anomaly wrote:Tedius: this should work for a meshbox as well. I have done this on one of my maps, I learned it from public servers. I can't recall which ones.
Owner @ BZFX
Core Admin @ CAN
Email me: bzmet…@gmail.com
I rolled up my sleeves and hand-coded a mesh. (actually I just ripped it from an existing map and changed the coordinates) I have no idea what most of the stuff means, but it seems to work. (texcoord wha?)
I just needed a simple flat box you could jump up through and land on top of, like the castle floors in Boxywar.
I just needed a simple flat box you could jump up through and land on top of, like the castle floors in Boxywar.
Sorry for opening up this topic after quite a few months...
I was just wondering what is wrong with this mesh:
The objective is to make a mesh like in the bases on Boxy War, for future reference. But this code doesn't work like those meshes at all...
Thanks,
I was just wondering what is wrong with this mesh:
Code: Select all
mesh
vertex -30 -30 11
vertex 30 30 11
vertex -30 30 11
vertex 30 -30 11
face
vertices 0 1 2 3
endface
face
vertices 3 2 1 0
passable
endface
end
Thanks,
- CannonBallGuy
- Private First Class
- Posts: 2083
- Joined: Wed Apr 12, 2006 1:31 am
- Contact:
You're using the vertexes in the wrong order... or defined them in the wrong order. Whichever...CUPCAKE wrote:Sorry for opening up this topic after quite a few months...
I was just wondering what is wrong with this mesh:
The objective is to make a mesh like in the bases on Boxy War, for future reference. But this code doesn't work like those meshes at all...Code: Select all
mesh vertex -30 -30 11 vertex 30 30 11 vertex -30 30 11 vertex 30 -30 11 face vertices 0 1 2 3 endface face vertices 3 2 1 0 passable endface end
Thanks,
You have to go around the edges of the shape you're making, not across...
Merry Christmas!
"Look, if I don't buy booze for the kids, I don't get any incriminating pictures to show to their parents, my business goes down the sink, my girlfriend leaves me and the baby goes on ebay. So help me search..."
"go Play With Toys urself in a dark alley u donkey ******" - Lt-Kirby2007
Oh, okay. That make more sense. Thanks!
EDIT: Okay I changed it to this:
Yet it still won't work...
In fact, my mesh has disappeared off the map.
EDIT2: Aha! For some reason this works, while the last one didn't:
EDIT: Okay I changed it to this:
Code: Select all
mesh
vertex -30 -30 11
vertex 30 -30 11
vertex -30 -30 11
vertex -30 30 11
face
vertices 0 1 2 3
endface
face
vertices 3 2 1 0
passable
endface
end
In fact, my mesh has disappeared off the map.
EDIT2: Aha! For some reason this works, while the last one didn't:
Code: Select all
mesh
vertex 30 30 11
vertex -30 30 11
vertex -30 -30 11
vertex 30 -30 11
face
vertices 0 1 2 3
endface
face
vertices 3 2 1 0
passable
endface
end
Last edited by CUPCAKE on Tue Aug 28, 2007 1:53 pm, edited 1 time in total.
to add to that, you are supposed to go around in a counter-clockwise direction:CannonBallGuy wrote: You're using the vertexes in the wrong order... or defined them in the wrong order. Whichever...
You have to go around the edges of the shape you're making, not across...
Code: Select all
mesh
vertex -1 0 2
vertex 1 0 2
vertex 1 0 0
vertex -1 0 0
face
vertices 1 0 3 2 # this will make a square-shaped face with the visible side facing south
endface
face
vertices 2 3 0 1 # makes the same shape in the same place, but the face is visible from the opposite side of the first face
endface
end
gazz: A bullet may have your name on it, but shrapnel is addressed "to whom it may concern".
http://bash.org/?785529
http://bash.org/?785529
By the way, the reason this doesn't work is in the fourth line you repeated the southwestern corner.CUPCAKE wrote:Yet it still won't work...Code: Select all
mesh vertex -30 -30 11 vertex 30 -30 11 vertex -30 -30 11 vertex -30 30 11 face vertices 0 1 2 3 endface face vertices 3 2 1 0 passable endface end
In fact, my mesh has disappeared off the map.
Personally, I like to label my vertices and always start in what I consider the lower left corner. It tends to make things simpler, especially when you start adding texcoords. Find a way that works and stick with it. Here's how I would code your panel:
Code: Select all
mesh
vertex -30 -30 11 #0
vertex 30 -30 11 #1
vertex 30 30 11 #2
vertex -30 30 11 #3
face #roof
vertices 0 1 2 3
endface
face #underbelly
vertices 1 0 3 2
passable
endface
end
this signature intentionally left blank