[Solved] T2 1.19 - How do you make a monster only visible if nearby? - by Niborius
Niborius on 3/6/2013 at 10:36
Hi guys,
I'm trying to make a monster (actually I'm editing the properties of a burrick) and I want it to be visible only when it's about a meter away from the player. I tried to play around with the "Distance Alpha" setting but so far no luck, I'm also not exactly sure what to fill in the textboxes. For example, it says "Near Distance" and "Far Distance" but if I type in 5, how big is the distance in-game?
Is there some other way to accomplish this maybe?
Thank you in advance. :thumb:
Notesthes on 3/6/2013 at 11:27
I tried this out lately, too.
You have to use "Distance Alpha" with "Transparency Alpha".
In Distance Alpha you have those things:
Quote:
"Near Alpha" - Alpha value to use when viewer is at a distance of "Near Distance" or closer.
"Far Alpha" - Alpha value to use when viewer is at a distance of "Far Distance" or further away.
"Near Distance" - Distance from object where alpha will be "Near Alpha", must not be larger than "Far Distance".
"Far Distance" - Distance from object where alpha will be "Far Alpha"
"Falloff Type" - Controls the curve that the alpha will fade based on distance:
[INDENT]- "Linear" - Changes at a constant rate.
- "Smoother at Near" - Levels out as viewer gets closer.
- "Smoother at Far" - Levels out as viewer moves away.[/INDENT]
This is important: [Quote:] "In order for this property to have any effect, the object also has to have the "Transparency (alpha)" property set.
The Distance Alpha alpha value is multiplied with the alpha from the Transparency property."
For example you can have: Transparency Alpha = 1.
Then in Distance Alpha:
Near Alpha = 1.
Far Alpha = 0.
Near Distance = 5.
Far Distance = 10.
That would make a burrick you see completly in the radius of 5 from it (because transparency alpha multiplied with near alpha is 1 * 1 = 1 alpha) and it would fade out if you go away to the radius of 10 (transparency alpha multiplied by far alpha is 1 * 0 = 0 alpha).
Another expample would be Transparency Alpha = 0.5, and Near Alpha = 0, Far Alpha = 1, near Distance = 4, Far Distance = 8. With this the burrick would be half visible for a distance of 8 or more, and it would disappear within the radius of 4. (The monster is then only visible if you are not nearby.)
For the Falloff Type you should try out, what is nicer.
Niborius on 3/6/2013 at 11:56
This is exactly what I was looking for, and it is working too!
Thanks a lot, Notesthes :thumb: