Page 1 of 1

Raising bubbles in air (solved)

Posted: Thu Apr 12, 2018 4:14 pm
by Barbie
I'm trying to realize some raising bubbles not in water, but in air for some days now without success.
Bubbles are usually created by a "BubbleGenerator"; a "Bubble" itself has a Buoyancy of 5, what makes it raising in liquid (I guess). If they are created in a none-liquid zone, they just fall down. How to make them raising in such a zone?

I tried giving them some speed up (like in SmokeGenerator):

Code: Select all

class RaisingBubble expands Bubble;

simulated function BeginPlay() {
	Super.BeginPlay();
	Velocity = Vect(0,0,50);
}
but they didn't raise.

Additionally I set Physics=PHYS_Projectile in the Defaultproperties, but that didn't make them raising neither.

Re: Raising bubbles in air

Posted: Thu Apr 12, 2018 5:06 pm
by sektor2111
I would use as "Guide" some SmokeGenerator with modifications, display as bubbles not sprite - I'm speaking about effects, I gotta admit, some tests are required first...

Re: Raising bubbles in air

Posted: Thu Apr 12, 2018 6:14 pm
by papercoffee
In the Mansion of Chaos map did we use a bubble effect for a non liquid zone.

Re: Raising bubbles in air

Posted: Thu Apr 12, 2018 8:37 pm
by Barbie
papercoffee wrote:In the Mansion of Chaos map did we use a bubble effect for a non liquid zone.
Found "BubbleHD" and "BubblesGen" in the package "ReactiveDecos", thanks for the hint.

Both is close to the stock Actors and to my approach setting Velocity and Physics. Why does that work and my not? Lets see...
sektor2111 wrote:I would use as "Guide" some SmokeGenerator with modifications, display as bubbles not sprite
I also tried that (the command "Velocity = Vect(0, 0, 50)" is taken from SpriteSmokePuff.uc) but with no success. The SmokeGenerator controls only RaisingRate but no other physics.

Re: Raising bubbles in air

Posted: Thu Apr 12, 2018 9:32 pm
by esnesi
Hope JackGriffin is doing good...
He would usually pop in here..

Re: Raising bubbles in air

Posted: Thu Apr 12, 2018 10:03 pm
by Barbie
I did it again from the scratch:

Code: Select all

class RaisingBubble expands Bubble;

var() float RisingRate;

simulated function BeginPlay() {
	Velocity = Vect(0,0,1) * RisingRate;
	Super.BeginPlay();
}
defaultproperties {
    RisingRate=111.00
    Physics=PHYS_Projectile
}
and used a SmokeGenerator with a few modified settings and it works. I don't know what I did wrong in my first attempts.

Re: Raising bubbles in air

Posted: Thu Apr 12, 2018 10:45 pm
by papercoffee
iSenSe wrote:Hope JackGriffin is doing good...
He would usually pop in here..
He is more active on OldUnreal now. :wink:

Re: Raising bubbles in air

Posted: Thu Apr 12, 2018 11:15 pm
by Feralidragon
I noticed that your test map has nothing custom on it, you're using the normal BubbleGenerator that the game already provides.
So I wonder if your mistake wasn't simply creating the script and code, but then running BubbleGenerator itself which would still spawn standard Bubble instances instead.

Which is actually not that of an uncommon mistake to make (I already had similar overlooks myself over the years, where I wasn't actually testing or running the code I actually made, when I thought I was).

Re: Raising bubbles in air

Posted: Fri Apr 13, 2018 5:08 am
by Barbie
Feralidragon wrote:I noticed that your test map has nothing custom on it
I thought "before you give your experimental map to the public, clean it up a bit" and I accidentally removed the "Class RaisingBubble" and its SmokeGenerator. :oops:

But I've found out why my Class RaisingBubble didn't work initially in my real map: it is derived from class Bubble and does not override the function ZoneChange:

Code: Select all

class Bubble extends Effects;

simulated function ZoneChange( ZoneInfo NewZone ) {
	if ( !NewZone.bWaterZone )
	{ 
		Destroy();
		PlaySound (EffectSound1);
	}	
}
My test map has no ZoneInfo (except the water hole) but the real map has. So in the real map the Bubble was spawned, sees a Zone around so the event ZoneChange is called. Because it is no WaterZone, my Bubble gets destroyed... :evil:

Re: Raising bubbles in air (solved)

Posted: Sun Apr 15, 2018 7:23 pm
by Hook
Maybe there is a way to "fool" it and adjust a waterzone info that way?

Also, just curious, would adjusting gravity (maybe negatively) have an effect on something like this, as it does with some other things like jumping and gibs flying?

Re: Raising bubbles in air (solved)

Posted: Sun Apr 15, 2018 10:23 pm
by Barbie
Hook wrote:Maybe there is a way to "fool" it and adjust a waterzone info that way?
Yes, I could create a water zone and use normal bubbles then, but for the the special case it is more convenient to have just raising bubbles (see pic).
RaisingBubbles.jpg
Hook wrote:Also, just curious, would adjusting gravity (maybe negatively) have an effect on something like this
This would require a separate zone, because only the bubbles should raise, not the players. :lol2:
I also tried negative buoyancy but it seems that buoyancy has only effect in liquids.

BTW: The problem of ZoneChange described above can easily be avoided by overriding that function. What means that the problem is solved.