Page 1 of 1

help with teleporters

Posted: Mon Dec 10, 2007 9:24 pm
by Easy Target
On my new map, i've made teleports, but from one way, you get stuck half way thru the tele, and i dont know what it is... I'm going to try raising them, to see if that helps, but pls tell me whats wrong with it, i'm attaching my map.

Posted: Mon Dec 10, 2007 10:13 pm
by Jefenry
When you get stuck going through a teleporter, it's usually one of three things.
1. The teleporter is too close to a wall.
2. The teleporter you're going to is too low
3. One teleporter is on 1.x stuff, and the other is on 2.x stuff

In your case, you have problem three. Your teleporters are going from the ground to a meshbox. The only way I know to fix this is to either convert the meshboxes to regular boxes, and do without textures, or raise the teleporter on the 2.x stuff .1 units. You will have to jump through it though to get back.
I suppose you could also make a very thin box between your teleporter and mesh that your tank could bump onto, but I haven't tried it.

Posted: Mon Dec 10, 2007 10:21 pm
by Easy Target
k i'll try that, but i do want to add textures to my map, but i'm having problems even doing that! i'm soo confused! argh :?

Posted: Tue Dec 11, 2007 3:13 am
by blast
Jefenry wrote:The only way I know to fix this is to either convert the meshboxes to regular boxes, and do without textures, or raise the teleporter on the 2.x stuff .1 units.
2.0.9 and 2.0.10 servers support texturing on the 'box' objects. However, I haven't tested to see if that would fix the teleporter issues, or if only a real 'box' without any 2.0.x features would fix that.

Posted: Tue Dec 11, 2007 3:45 am
by Easy Target
ok, i'll try making it a regular box with texture, thanks guys.

Posted: Tue Dec 11, 2007 5:01 am
by Jefenry
Hmm, a textured box doesn't work either. Try the attached map. I've got four platforms with corresponding teleporters. The one with the brick texture is a regular box. The red one is a meshbox. The blue one is a textured box. And the green one is a textured box with a thin box just under the teleporter--which works.

It looks like you'll need to put thin boxes under your teleporters if you still want textures, Easy Target.

Heres the important bit-

Code: Select all

material
  name green
  addtexture green_tank.png
end

box
  name Textured_Box
  matref green
  position 0 0 0
  size 8 8 5
end

box
  name Thin_Piece
  position 0 0 5.1
  size 1 7 0.1
end

teleporter Meshbox_Fix_Top
  position 0 0 5.2
  size 0.56 5 5
  border 1.12
end
Then, add another teleporter wherever you want, and link them.

Posted: Tue Dec 11, 2007 5:15 am
by Easy Target
Jef, i tried the map that you sent me, and i still get stuck on the boxes...
also, whenever i run a test server, it wont let you make box with matref and stuff it only acknowledges meshboxes...

oooh, i'm soo confused :cry:

Posted: Tue Dec 11, 2007 3:05 pm
by Jefenry
Easy Target wrote:whenever i run a test server, it wont let you make box with matref and stuff it only acknowledges meshboxes...
Which version of BZFlag do you have? Anything that's 2.0.8 or older doesn't support boxes with textures. I've got 2.0.10 RC3 and it's working for me. :?

Posted: Tue Dec 11, 2007 9:05 pm
by Easy Target
I have upgraded to 2.0.10, but whenever i run a test server via command prompt, after i input all of the data, it always says

-unknown object "matref" line 2013 or stuff like that, and the matref is used in a regular box, like you had on yours, i test all of my maps on 2.0.10, but whenever i'm testing it, it always says that =(

Posted: Wed Dec 12, 2007 2:29 am
by ducatiwannabe
Yeah, in a recent map I was working on the texture applied to a regular box didn't work too well. For some reason the collision check in bz doesn't work well with meshes and 2.x objects crossing with 1.x objects.

I wasn't able to have a tank bump up on to a 0.01 height meshbox, so I had to put up a very small and thin normal box directly in front of it, so that you bump up on to the normal box and then drop on to the meshbox. It's easy to get off of a meshbox on to a normal box with _maxBumpHeight, so that worked pretty well.

For the teleporter crisis, I tried placing a small box for the tank to bump up on (using the variable _maxBumpHeight) before going through the teleporter, so that the tank goes in slightly higher than the teleporter bottom, spitting you out with a small drop to the meshbox. That worked fine and dandy until you went back through the teleporter... and got stuck in the small box positioned near the first one.

So this is what I've done. First off, I've attached the file I'll be referring to, which I hope helps. On one side I placed two regular teleporters and three borderless teleporters across from them. The two regular teleporters going to the meshbox platform above them still get the same error - you can not get through without jumping. The other side:

A. Has an almost unseeable bumpblock (using the _maxBumpHeight variable) to make you just high enough to go from the ground to the meshbox without getting stuck, making you drop about 0.005 units (the height of the bump block) when you come out on top of the platform.

B. Has fake borders. I framed the borderless teleporters with meshboxes and used the caution texture on them (which isn't perfect, but this was a test).

C. Is actually made of three teleporters (was going to be four, but I thought that unnecessary). The bottom "teleporter" is composed of one teleporter that is 7.5 units high and another on top of that, positioned 7.5 units in the air, and sized 2.5 units tall. A tank will go through the bottom one and bump on the bump block (see A), allowing it to pass up on to the meshbox platform. When going from the teleporter atop the meshbox back to the ground, so a tank will not get stuck in the small bump block, you come out the top of the two stacked teleporters and drop to the ground. This makes the two stacked teleporters look like one and complete the function perfectly.

Other than this, another fix I can think of is having a low height, very thin box that gets you on to a very small meshbox which will use physics to bounce your tank ever so slightly through the teleporter, making you go just high enough to clear the meshbox bug. But both of these things make a lot more work than most of us would like to do.

Does anybody know if this bug will be fixed in a future version of bzflag?

Posted: Wed Dec 12, 2007 3:26 am
by Jefenry
ducatiwannabe wrote:C. Description of making a two story teleporter.
Unless I'm misunderstanding you, that seems like a whole lot of work for what I've got going in my map a few posts up. Instead of putting the bump box on the ground, why don't you put it between the meshbox or textured box and the teleporter?
In my map a tank will go from the ground, halfway through the teleporter, bump onto the block, through the teleporter, and bump down onto the meshbox. Then it's just as easy to come back.

Posted: Wed Dec 12, 2007 3:39 am
by ducatiwannabe
That was what I tried originally, but with a normal box on a normal meshbox (nontextured), it sealed the tank when you tried to get on the small normal box to go back through the teleporter from the meshbox. The only way I was able to fix this on version 2.0.10 was to make the block one unit high and set _maxBumpHeight to 1.1. My way, though complicated and over explained, does not seal the tank, and works for both ways. Of course, it isn't very practical, but it was fun to do.

Posted: Wed Dec 12, 2007 6:22 pm
by Joe-Schmoe
All you have to do is make a mesh on top of the box. That way there's no bumping, no sealing, and you can go seamlessly from 2.0 objects to other 2.0 objects. You can also keep your textures.

Unless this doesn't work for some reason...

Posted: Wed Dec 12, 2007 9:11 pm
by Easy Target
This is what I did, I added a 0.1 size box underneath the teleporter that was on the ground, and for the teleporter that was on the mesh box, I made it 1 unit off of the meshbox and then added a regular box that is size 1 and it connects directly to the teleporter. This seemed to work really well. I also added a matref to the regular box that is above the meshbox, so that it doesnt clash...

Will the matref show up when i get the map hosted (on the regular boxes)?