Second thing is: can I make them disappear if they move out of the water?
Bubbles
Bubbles
Got a problem. My bubbles can't be prevented from moving through walls :/ Anyone can tell me what I've to do to make 'em solid? There are no contents or such for localents, bounceFactor= 0 didn't do anything, the bloodtrail isn't even moving so I can't copy that
Second thing is: can I make them disappear if they move out of the water?
Second thing is: can I make them disappear if they move out of the water?
[color=#FF0000]/callvote kick all_enemies[/color]
-
Silicone_Milk
- Posts: 2237
- Joined: Sat Mar 12, 2005 10:49 pm
Re: Bubbles
Like machinegun/shotgun bubbles and such?
Are you using a single brush for the water?
Are you using a single brush for the water?
Re: Bubbles
yup, those bubbles =)
and well, I don't think it'll be possible to use a single water brush in maps that are more like... complex (=
and well, I don't think it'll be possible to use a single water brush in maps that are more like... complex (=
[color=#FF0000]/callvote kick all_enemies[/color]
-
Silicone_Milk
- Posts: 2237
- Joined: Sat Mar 12, 2005 10:49 pm
Re: Bubbles
I was actually going to suggest using multiple brushes if you were just using one.
The bubbles are actually hopping across several brushes?
The bubbles are actually hopping across several brushes?
Re: Bubbles
Well, they got a random movement like 5*crandom() and an upwards movement like 30+5*crandom(), so yes, they could move from one brush into another.
[color=#FF0000]/callvote kick all_enemies[/color]
-
Silicone_Milk
- Posts: 2237
- Joined: Sat Mar 12, 2005 10:49 pm
Re: Bubbles
I don't remember the code at all. Do they spawn as a centity or something? I thought they were constrained to the dimensions of the liquid brush they spawned in.
Re: Bubbles
Nah, they aren't centities, they're local ents...
and there's nothing like contentmask/ contents for localents :/
EDIT: just realized that bouncefactor and bouncesound are used with LE_FRAGMENTs only... I'll check it out.
Code: Select all
localEntity_t *le;
refEntity_t *re;
le = CG_AllocLocalEntity();
le->leFlags = LEF_PUFF_DONT_SCALE;
le->leType = LE_MOVE_SCALE_FADE;
le->startTime = cg.time;
le->endTime = cg.time + 100000;
le->lifeRate = 1.0 / ( le->endTime - le->startTime );
re = &le->refEntity;
re->shaderTime = cg.time / 1000.0f;
re->reType = RT_SPRITE;
re->rotation = 0;
re->radius = 4-(int)(3*crandom());
re->customShader = cgs.media.waterBubbleShader;
re->shaderRGBA[0] = 0xff;
re->shaderRGBA[1] = 0xff;
re->shaderRGBA[2] = 0xff;
re->shaderRGBA[3] = 0xff;
le->color[3] = 1.0;
le->pos.trType = TR_LINEAR;
le->pos.trTime = cg.time;
VectorCopy( move, le->pos.trBase );
le->pos.trDelta[0] = crandom()*5;
le->pos.trDelta[1] = crandom()*5;
le->pos.trDelta[2] = crandom()*5 + 30;
VectorAdd (move, vec, move);EDIT: just realized that bouncefactor and bouncesound are used with LE_FRAGMENTs only... I'll check it out.
[color=#FF0000]/callvote kick all_enemies[/color]
-
Silicone_Milk
- Posts: 2237
- Joined: Sat Mar 12, 2005 10:49 pm
Re: Bubbles
Ah I see. Any progress so far?
Re: Bubbles
Nope, been busy with school (: I'll look into it today or tomorrow.
[color=#FF0000]/callvote kick all_enemies[/color]
Re: Bubbles
Here we go.
changing the leType to LE_FRAGMENT resulted in invisible/no bubbles
It seems to need a model like the body parts when you're gibbed :/ (?)
If nothing else works, I'll try making a CG_AddBubble func, but I'm hoping I won't have to
changing the leType to LE_FRAGMENT resulted in invisible/no bubbles
It seems to need a model like the body parts when you're gibbed :/ (?)
If nothing else works, I'll try making a CG_AddBubble func, but I'm hoping I won't have to
[color=#FF0000]/callvote kick all_enemies[/color]