Problem with "seminvisible" wall
Moderator: InsideQC Admins
5 posts
• Page 1 of 1
Problem with "seminvisible" wall
I have tried to create a function in that a brush is invisible and when it is activated be visible and then be invisible again (in this case it disappears).
For this I have used the resource of "alpha".
The function works well being visible but the "self.wait" sometimes fails. The time so that the brush disappears changes too much, the self wait is never precise!
And I do not know why this happens!!!!!!!!!!!!
does an alternative occur to you for a similar function?
Thanks in advance!!!!!!!!!!
For this I have used the resource of "alpha".
The function works well being visible but the "self.wait" sometimes fails. The time so that the brush disappears changes too much, the self wait is never precise!
And I do not know why this happens!!!!!!!!!!!!
does an alternative occur to you for a similar function?
- Code: Select all
void() removesemiwall =
{
self.model = string_null;
self.solid = SOLID_NOT;
self.movetype = MOVETYPE_NONE;
};
void() semiwall =
{
self.alpha = self.count;
self.nextthink = time + self.wait ;
self.think = removesemiwall;
};
void() func_semiwall =
{
if (!self.count)
self.count = 1;
if (!self.wait)
self.wait = 0.1;
self.angles = '0 0 0';
self.movetype = MOVETYPE_PUSH;
self.solid = SOLID_BSP;
setmodel (self, self.model);
self.use = semiwall;
self.alpha = -1;
};
hi, I am nahuel, I love quake and qc.
-

Nahuel - Posts: 492
- Joined: Wed Jan 12, 2011 8:42 pm
- Location: mar del plata
self.think is fully reliable on solid_bsp objects...
except on movetype_push objects, it works slightly differently, using self.ltime instead of time.
void() semiwall =
{
self.alpha = self.count;
self.nextthink = self.ltime + self.wait;
self.think = removesemiwall;
};
as a general rule of thumb, you should avoid using alpha < 1/255.0 as engines might consider that to be fully visible.
except on movetype_push objects, it works slightly differently, using self.ltime instead of time.
void() semiwall =
{
self.alpha = self.count;
self.nextthink = self.ltime + self.wait;
self.think = removesemiwall;
};
as a general rule of thumb, you should avoid using alpha < 1/255.0 as engines might consider that to be fully visible.
- Spike
- Posts: 2892
- Joined: Fri Nov 05, 2004 3:12 am
- Location: UK
5 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest