Raising bubbles in air (solved)

Discussions about Coding and Scripting

Raising bubbles in air (solved)

Postby Barbie » Thu Apr 12, 2018 4:14 pm

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 18 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
Barbie
Godlike
 
Posts: 1463
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Raising bubbles in air

Postby sektor2111 » Thu Apr 12, 2018 5:06 pm

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
sektor2111
Godlike
 
Posts: 3496
Joined: Sun May 09, 2010 6:15 pm
Location: vect(1,1,1)

Re: Raising bubbles in air

Postby papercoffee » Thu Apr 12, 2018 6:14 pm

In the Mansion of Chaos map did we use a bubble effect for a non liquid zone.
User avatar
papercoffee
Site Staff
 
Posts: 8691
Joined: Wed Jul 15, 2009 11:36 am
Location: Cologne, the city with the big cathedral.
Personal rank: coffee addicted !!!

Re: Raising bubbles in air

Postby Barbie » Thu Apr 12, 2018 8:37 pm

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
Barbie
Godlike
 
Posts: 1463
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Raising bubbles in air

Postby iSenSe » Thu Apr 12, 2018 9:32 pm

Hope JackGriffin is doing good...
He would usually pop in here..
User avatar
iSenSe
Experienced
 
Posts: 98
Joined: Mon Aug 31, 2015 12:58 pm

Re: Raising bubbles in air

Postby Barbie » Thu Apr 12, 2018 10:03 pm

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
Barbie
Godlike
 
Posts: 1463
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Raising bubbles in air

Postby papercoffee » Thu Apr 12, 2018 10:45 pm

iSenSe wrote:Hope JackGriffin is doing good...
He would usually pop in here..

He is more active on OldUnreal now. :wink:
User avatar
papercoffee
Site Staff
 
Posts: 8691
Joined: Wed Jul 15, 2009 11:36 am
Location: Cologne, the city with the big cathedral.
Personal rank: coffee addicted !!!

Re: Raising bubbles in air

Postby Feralidragon » Thu Apr 12, 2018 11:15 pm

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
Feralidragon
Godlike
 
Posts: 4889
Joined: Wed Feb 27, 2008 6:24 pm
Location: Liandri
Personal rank: Work In Progress

Re: Raising bubbles in air

Postby Barbie » Fri Apr 13, 2018 5:08 am

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
Barbie
Godlike
 
Posts: 1463
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Raising bubbles in air (solved)

Postby Hook » Sun Apr 15, 2018 7:23 pm

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)
Forums - http://hooksutplace.freeforums.net
UT99 Game Server -> CROSSBONES Lucifurs 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
User avatar
Hook
Masterful
 
Posts: 632
Joined: Tue Apr 22, 2008 11:21 pm
Location: Minnesota USA
Personal rank: UT99 Promoter/Admin

Re: Raising bubbles in air (solved)

Postby Barbie » Sun Apr 15, 2018 10:23 pm

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


Return to Coding, Scripting

Who is online

Users browsing this forum: No registered users and 2 guests

cron