Raising bubbles in air (solved)

Discussions about Coding and Scripting
Post Reply
User avatar
Barbie
Godlike
Posts: 2792
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Raising bubbles in air (solved)

Post 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.
Attachments
TestBubbles.unr.7z
Environment for testing bubbles
(2.68 KiB) Downloaded 49 times
Last edited by Barbie on Fri Apr 13, 2018 5:08 am, edited 1 time in total.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Raising bubbles in air

Post 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...
User avatar
papercoffee
Godlike
Posts: 10443
Joined: Wed Jul 15, 2009 11:36 am
Personal rank: coffee addicted !!!
Location: Cologne, the city with the big cathedral.
Contact:

Re: Raising bubbles in air

Post by papercoffee »

In the Mansion of Chaos map did we use a bubble effect for a non liquid zone.
User avatar
Barbie
Godlike
Posts: 2792
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Raising bubbles in air

Post 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.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
esnesi
Godlike
Posts: 1018
Joined: Mon Aug 31, 2015 12:58 pm
Personal rank: Dialed in.

Re: Raising bubbles in air

Post by esnesi »

Hope JackGriffin is doing good...
He would usually pop in here..
User avatar
Barbie
Godlike
Posts: 2792
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Raising bubbles in air

Post 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.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
papercoffee
Godlike
Posts: 10443
Joined: Wed Jul 15, 2009 11:36 am
Personal rank: coffee addicted !!!
Location: Cologne, the city with the big cathedral.
Contact:

Re: Raising bubbles in air

Post by papercoffee »

iSenSe wrote:Hope JackGriffin is doing good...
He would usually pop in here..
He is more active on OldUnreal now. :wink:
User avatar
Feralidragon
Godlike
Posts: 5489
Joined: Wed Feb 27, 2008 6:24 pm
Personal rank: Work In Progress
Location: Liandri

Re: Raising bubbles in air

Post 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).
User avatar
Barbie
Godlike
Posts: 2792
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Raising bubbles in air

Post 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:
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
Hook
Inhuman
Posts: 754
Joined: Tue Apr 22, 2008 11:21 pm
Personal rank: UT99 Promoter/Admin
Location: Minnesota USA
Contact:

Re: Raising bubbles in air (solved)

Post 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?
=Hook=(Member# 626)
HUTP Active Forums: https://hooksutplace.freeforums.net/forum
HUTP UT99 Community Portal: https://hooksutplace.freeforums.net/
OR: https://hermskii.com/hook/ut99_hutp/
UT99 Server -> CROSSBONES Missile Madness {CMM}

* Newest Versions of: PRO-Redeemers | PRO-SNIPER-Redeemers | PRO-SEEKER-Redeemers <-(the Original)
and Now with FOOD FIGHT and Frying Pan arena !!!
IP: 68.232.181.236:7777 <-(NEW IP to come)
UT99 MH Server -> {CMH} CROSSBONES Monster Hunt (MH) by Mars007 (The Original) - IP: 108.61.238.93:7777
User avatar
Barbie
Godlike
Posts: 2792
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Raising bubbles in air (solved)

Post 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.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
Post Reply