Page 1 of 1

Death Objects And Hiding Objects

Posted: Wed Jul 04, 2012 10:34 am
by MG Balloon
I have 2 Questions:

1. Can We Hide Any Object From Appearing On The Map? Such As A Teleporter, Or Is A Plugin Needed for that? Or Is It even Possible With A Plugin?

2. Can We Make Any Death Objects That Wont Kill A specific Team? Or Is A Plugin Needed For That? Or Is It even Possible With A Plugin?

Re: Death Objects And Hiding Objects

Posted: Wed Jul 04, 2012 10:47 am
by SkillDude
Objects cannot change once the map has been started. Whatever their appearance is when they are created is the state they will remain in. (Only exception is drawInfo, which is not relevant here) Nothing can be done about it. Note that you can make an object invisible out the screen (invisible texture / color) or invisible on the radar (noradar option, except for teleporters), but still be usable / solid on the map itself.

You cannot make a death object only kill a certain team. It either kills anyone that touches it, or no one. It is possible to have a plugin that lets you specify zones tanks cannot be in and kill them on a per-team basis, if that alternative is viable.

Re: Death Objects And Hiding Objects

Posted: Wed Jul 04, 2012 11:19 am
by MG Balloon
Oh Thx Sig, That answered my questions :)

Re: Death Objects And Hiding Objects

Posted: Wed Jul 04, 2012 11:59 am
by MG Balloon
Oh And from what i get in ur reply, a plugin is needed to specify zones tanks cannot be in. Is that for spawning too? If it dsnt need a plugin please tell me how to do it

Re: Death Objects And Hiding Objects

Posted: Wed Jul 04, 2012 12:18 pm
by SkillDude
A tank's spawn zone can be specified as follows, straight from the wiki:

Code: Select all

zone 
name example_zone
   position 0.0 0.0 0.0
   size 1.0 1.0 1.0
   rotation 0.0
   #Specify a zone for all teams.
   team 0 1 2 3 4
end
See http://wiki.bzflag.org/Zone for full details. All map making elements can be found in the wiki. I always try and suggest to use the bzw man page that comes with BZFlag as well, have one linked here: http://z-gamers.net/uploader/multi-file ... s/bzw.html. Just takes some searching, but is thorough.

Re: Death Objects And Hiding Objects

Posted: Thu Jul 05, 2012 8:29 pm
by Tanx
there is one way to somewhat change the appearance, but not really change move. using spheremapping will cause a texture to appear to move on an object when you do, if I remember correctly this makes interesting appearance of textures that are partially seethrough

Re: Death Objects And Hiding Objects

Posted: Mon Jul 30, 2012 5:40 pm
by Zverina
You already got awesome replies, but I want to give one more.

"Can We Hide Any Object From Appearing On The Map?"

Well, if you want t create a Map and make an object invisible, just create it is a Mesh and then set Alpha to 0.
There you go, invisible object!

Re: Death Objects And Hiding Objects

Posted: Mon Jul 30, 2012 5:51 pm
by blast
Despair wrote:You already got awesome replies, but I want to give one more.

"Can We Hide Any Object From Appearing On The Map?"

Well, if you want t create a Map and make an object invisible, just create it is a Mesh and then set Alpha to 0.
There you go, invisible object!
That was mentioned in the first reply.

Re: Death Objects And Hiding Objects

Posted: Mon Jul 30, 2012 6:32 pm
by Zverina
Yes, but he did not mention the Mesh and that Mesh has an option called "Alpha".

Re: Death Objects And Hiding Objects

Posted: Mon Jul 30, 2012 6:45 pm
by Tanx
yes, its another way to do it, but there are many ways to do it. not all are as practical, I mean you could also use drawinfo as well, but who would want to do that? no materials would even be required if you used drawinfo though. but very impractical

Re: Death Objects And Hiding Objects

Posted: Mon Jul 30, 2012 7:26 pm
by blast
Alpha is part of the color (or 'diffuse') option. It's not a separate option in a material.

Re: Death Objects And Hiding Objects

Posted: Mon Jul 30, 2012 10:04 pm
by Zverina
blast,

You can set variables for a Mesh, Red - Green - Blue - Aplha

Now, why did I point out Alpha, well, with Red - Green - Blue you may set any color you want the object to be in, while Alpha is transparency.

You can set this variables from 0 to 1, and setting Alpha to 0 makes the Object invisible.

Re: Death Objects And Hiding Objects

Posted: Mon Jul 30, 2012 10:39 pm
by Tanx
the closest thing to this, that is setting red, green, blue, or alpha seperately is not in mesh, in fact it would be in dynamicColor, in materials it would be diffuse x y z 0 for alpha = 0

in dynamicColor

Code: Select all

dynamicColor
  name dc1
  alpha limits 0 0
end

material
  name mater1
  dynCol dc1
end

box 
  position 0 0 0
  size 10 10 10
  matref mater1
end
and just to further my point

http://wiki.bzflag.org/Mesh

there is no set alpha there, and even if there were, using materials for it would be more practical.
another page that may be of use

http://wiki.bzflag.org/Material

Re: Death Objects And Hiding Objects

Posted: Wed Aug 01, 2012 3:39 am
by optic delusion
There is also the "no radar" and noshadow options. Shadow is very important, often overlooked. (heh) You should stay away from using alpha to make transparent, there are better ways.
If you have a great number of transparent, or semi-transparent objects, it can slow rendering significantly. Especially if you use alpha channel to make clear.
These other options will negate that problem.


Here is what I consider to be the ideal invisible material.

Code: Select all

 material 
  name invisible 
  diffuse 0 0 0 0 
  noculling 
  noradar 
  noshadow 
  nosorting  
  nolighting 
  groupalpha 
 end
 

You could also make a completely invisible tele porter, with "border 0" and...

Code: Select all

  material
  name LinkMaterial
  addtexture http://images.bzflag.org/pmatous/transparent/Trans-100.png
end

I have other semi-transparent textures in that image folder. They may be handy as well.

Re: Death Objects And Hiding Objects

Posted: Wed Aug 01, 2012 3:54 am
by blast
I believe that 'noradar' only works for the 'fast' or 'fast sorted' radar types.

And the invisible teleporter will still cause the yellow glow when you get close to it.

Re: Death Objects And Hiding Objects

Posted: Wed Aug 01, 2012 6:47 am
by Zverina
Hmm, yeah, Shadows still show. :)

I may be wrong, and if I am, it would be a cool feature.

I heard (or was I only imagining it?) there is a Plug-in in which you can set what time of day would be through the whole play-time. Holding down = would not do a thing.

Having it at 12:00 would be cool. :)

Re: Death Objects And Hiding Objects

Posted: Wed Aug 01, 2012 7:07 am
by SkillDude
Despair wrote: I heard (or was I only imagining it?) there is a Plug-in in which you can set what time of day would be through the whole play-time. Holding down = would not do a thing.
The in-game variable _syncTime would force the client to use the server's time of day as the display on their client. However, there is no way to stop the time from passing.

Re: Death Objects And Hiding Objects

Posted: Wed Aug 01, 2012 7:09 am
by Zverina
I see, thanks.

Can you use this variable only In-Game, or can you set it in .bzfs as well?

Sorry, never used that.

Re: Death Objects And Hiding Objects

Posted: Wed Aug 01, 2012 9:43 am
by SkillDude
The option can be set just like any other variable, whether it's defined in a config file that is specified, in the map file's options, or directly in bzfs itself.

Re: Death Objects And Hiding Objects

Posted: Wed Aug 01, 2012 10:32 am
by blast
You can set the _latitude and _longitude to specific areas that would, for instance, always be day or always be night, though you would have to adjust this depending on the time of year.

Re: Death Objects And Hiding Objects

Posted: Wed Aug 01, 2012 11:18 am
by Zverina
I see.
Okay, will keep that in mind.

Also, the weather changes and sky color do not effect this, right?

Edit: Since some do not like me to keep this forums active, I will stop.

Re: Death Objects And Hiding Objects

Posted: Wed Aug 01, 2012 11:28 am
by SkillDude
This is a bit annoying that you are getting way side tracked off of the original topic. You can easily ask these through private message, in game, or just start a new topic concerning this, for whatever reason you have to know this information.

To answer your question, weather and sky color will not be affected. However, do note that sky color does get affected based on the time of day. At night, the sky color barely changes the actual night sky while during the day it completely obscures it. This is most noticeable on maps that actually change the sky color on cap.