Jump to content
Official BF Editor Forums
ultimate-tester

Make A Object Invisible

Recommended Posts

Hello everyone,

In BFeditor you have the option for a object: Is Visible.

If you uncheck this, your object is invisible.

If you save, and loadup the game, your object is still visible.

Im talking about a secret ladder I want to make. The ladder has to be invisible, so that nobody can see it.

But.. If you walk to it, you have to climb. So the collision has still to be there..

How do I fix this?

Gr. Ultimate-Tester

Share this post


Link to post
Share on other sites

why dont just clone a ladder, and make a invisible(transparent) texture for it.. thats the idea.. the experts will probably help you accomplish it :)

Share this post


Link to post
Share on other sites

Instead of carrying the load of all those polys and having to do the transparency checks to boot, the super easy way to do this is to:

1) Make a model of a single tiny triangle thats facing downwards so its hard to see.

2) Namel it whateveryouwant__Ladder (with two underscores), *or* after you export go in the .con and change the line that creates it from SimpleObject to a Ladder [ObjectTemplate.create Ladder whateveryouwant]

3) Change the collisionMesh to whatever ladder from BF2 thats the desired height. For a 10m tall ladder, change to ObjectTemplate.collisionMesh ladder_10m for example

4) Map the #0 material to a ladder material (6600)

See now you can place that tiny triangle somewhere, but the important thing is that its dragging the col mesh of a real ladder with it, which is what the player interacts with to cause the climbing action.

A good way to see your new invisible ladder when positioning on a map btw is to go in the Render menu and make the Decal meshes visible. The rungs will suddenly appear in yellow. My favorite thing to put invisible ladders behind are those tall vines you find west of the hotel on Karkand or the in the US base on Mashtuur. Note that you need the 6600 material for the game to recognize it as a climbing surface, but you'll also hear that chick-chick-chick sound when you climb it unfortunately.

Share this post


Link to post
Share on other sites
A good way to see your new invisible ladder when positioning on a map btw is to go in the Render menu and make the Decal meshes visible.

Is there a way to do this ingame? Maybe a command that you need to put in the init.con? (c:\program files\ea games\battlefield 2\mods\bf2\init.con)

Share this post


Link to post
Share on other sites

Mmmm... might be a tiny chance that theres some obscure pulldown menu command to show the col meshes in game but I doubt it. Hit ~, type "renderer." and press Tab twice to see a list of all the commands available. You could also setup something custom in your map's tmp.con which would allow you to just have to reload the map instead of exiting the game completely. MS might have a tip how to do that (something he mentioned before but I cant for the life of me find that one post).

Share this post


Link to post
Share on other sites

Afaik, this only works with the debugger EXE :

Launch your map and open the console with the 'End' key . Enter this sequence of commands ( in bold ) into it:

collisionManager.buildDebugCollisionMeshes this will need a short moment

collisionManager.draw Meshes 1

Remember that the <TAB> key is your friend for autocompletion of the command.

This will show you the col0's of the objects (projectile collision ) for the first 3P geom. To switch the geom to the wrecks (where applicable, staticobjects don't have this) , enter

collisionManager.setGeometry 1 switch back to the first geom with a 0 in this line. To switch the displayed col , enter

collisionManager.setActiveLod N , where N is the colN to display.

col0 - Projectile collision mesh

col1 - Physics collision mesh ( vehicles, landscape )

col2 - Soldier collision mesh ( soldiers will collide with this mesh )

col3 - aux. mesh for navmesh generation - only on selected statics

Note that no visual occlusion is rendered , so the colmeshes will shine through the terrain. Thats because the server ( which handles collision ) has no idea about visual objects.

Edited by mschoeldgen[Xww2]

Share this post


Link to post
Share on other sites

Ow, its really not so bad with BF2's built-in errors. You should encounter about ten errors about the hud setup ( DICE obviously tried to setup a secondary screen at one point in the development ) , the 'bandWidthChoke' error which the debugger is too old to recognize and about 8 errors about a componentID in a weapon used twice.

That should be it. If there are other errors they are caused by your files.

Share this post


Link to post
Share on other sites
I discovered a way easier way.. Extract staticobjects.con from the server archive, find the ladder, and add the rule:

Object.isVisible "0"

But thanks for the help anyway!

Wait, what? Did this work? Does it work server side or does the client have to have this as well?

Share this post


Link to post
Share on other sites
hmmm. i dont have a bf2_r.exe file in my bf2 directory..

aahhh.. doesn't matter. Ill find it..! TY anyway

You only have the _r.exe if you have the editor installed. If you got the editor (which i think you have) something is very wrong..

Share this post


Link to post
Share on other sites
On 22/08/2008 at 11:46 AM, ultimate-tester said:

I discovered a way easier way.. Extract staticobjects.con from the server archive, find the ladder, and add the rule:

Object.isVisible "0"

But thanks for the help anyway!

Thank you

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×