Page 1 of 1

how to have fireflies in a map

Posted: Tue Nov 21, 2023 6:26 pm
by sXs-sketchpad
hi all i wanted to put some fireflies in a map im remixing is there a way to do that thanks



{SFL}sketchpad

Re: how to have fireflies in a map

Posted: Tue Nov 21, 2023 7:59 pm
by Buggie
Look at code of MH-TheFifthVortex. There already placed firefly on few places.
viewtopic.php?t=14166

Re: how to have fireflies in a map

Posted: Tue Nov 21, 2023 9:00 pm
by Barbie
SBFireFly UScript code

Code: Select all

class SBFireFly expands FlockPawn;
// originally taken from:
//=============================================================================
// FireFly.
//
// Actor Created by Steve Nabors
// Feb 2001
// http://www.planetunreal.com/slick
// slickWilly@planetunreal.com
//
// Add to level and Adjust CircleRadius and Vertical Range.
// CircleRadius determines how far out the firefly will
// fly from the central location where it was placed.  Vertical
// Range Determines the Vertical Radius it will fly up and down.
//
// Be Careful not to place the FireFlies where they will
// run into stuff like walls.  They aren't very smart
// and will get stuck.
//
//=============================================================================


var() int CircleRadius;
var() int VerticalRange;
var	vector CircleCenter;

auto state circle {
ignores seeplayer, enemynotvisible;

begin:
	SetPhysics(PHYS_Flying);
	CircleCenter = Location;

wander:
	Destination = Vrand() * CircleRadius + CircleCenter;
	Destination.Z = CircleCenter.Z + RandRange(-VerticalRange,VerticalRange);

	MoveTo(Destination);
	Goto('Wander');
}


defaultproperties {
	CircleRadius=128
	VerticalRange=128
	AirSpeed=250.00
	AccelRate=1000.00
	SightRadius=2000.00
	AttitudeToPlayer=ATTITUDE_Friendly
	Land=None
	bCanTeleport=False
	Physics=PHYS_Flying
	Style=STY_Translucent
	Sprite=Texture'Botpack.FlakGlow.fglow_a00'
	Texture=Texture'Botpack.FlakGlow.fglow_a00'
	DrawScale=0.20
	bUnlit=True
	bGameRelevant=False
	bIsKillGoal=False
	CollisionRadius=1.00
	CollisionHeight=1.00
	bCollideActors=False
	bBlockActors=False
	bBlockPlayers=False
	bProjTarget=False
	LightType=LT_Steady
	LightEffect=13
	LightBrightness=255
	LightHue=30
	LightSaturation=64
	LightRadius=4
	LightCone=128
	bRotateToDesired=False
	RotationRate=(Pitch=50000,Yaw=50000,Roll=20000),
}

Re: how to have fireflies in a map

Posted: Sat Nov 25, 2023 12:21 am
by jmartin
Another possible method that requires no mods or scripting is place a few Bird1 flock pawns in your map and switch their Display\Mesh property to LodMesh'UnrealShare.TazerProja'

Adjust the DrawScale to make them as big or as small as you want.

I used this in DmMappersCafe to simulate UFOs flying around in the sky box and it worked pretty well.

Be sure to set bNoMonsters=False in the ini file or you wont see the flies.

Re: how to have fireflies in a map

Posted: Sat Nov 25, 2023 8:43 am
by sektor2111
Entertaining stuff in changing a mesh that will call later NULL animations...
A "Bird1" it's NOT a "Firefly" and it's not working normally like that.
Not a problem, I don't need to use these after all, if geometry is normal then all can be NORMAL later...

Re: how to have fireflies in a map

Posted: Sat Nov 25, 2023 7:56 pm
by Red_Fist
sektor2111 wrote: Sat Nov 25, 2023 8:43 am Entertaining stuff in changing a mesh that will call later NULL animations...
A "Bird1" it's NOT a "Firefly" and it's not working normally like that.
Not a problem, I don't need to use these after all, if geometry is normal then all can be NORMAL later...

What if you make a new class below ?

It seems like a good idea, then edit the flying pattern to random directions.
OR try an atom electron valance rings type of art with the birds radius,, friggen Spirograph, LoL try different glowing meshes.
look pretty cool in my opinion. if it can work correctly.

Re: how to have fireflies in a map

Posted: Sun Nov 26, 2023 7:56 am
by sektor2111
When people will play the game, maybe they will find maps that are having already these fireflies, wheel was already invented, do use it.
Changing mesh of an actor supposed to run animations is only messing actor, engine will attempt to run animations that are nowhere, in logs are printed errors but it's not like "walls-drawers" are interested how do they keep failing in every single technical aspect.
There is even a custom UT-LOGO done by community map that uses such things, Textures can be changed with something dynamic (dynamic texture) and voila, easy as a pie.
FF_DoneAlready.PNG
It's called UT-Exo-Map.unr and is dated 2004 - 19 years ago...
You can simply load map and selecting "Firefly" then opening map in construction and adding these actors in desired spot. In games with "bNoMonsters" something can be done for ensuring existence of these "pawns" but... maybe there are rules that need to be respected.
If we speak about Textures for something more dynamic, we can have this...
UT-Exo-Map1.7z
(5.72 KiB) Downloaded 3 times
Full effect when UnrealTournament.ini looks like here...

Code: Select all

[URL]
Protocol=unreal
ProtocolDescription=Unreal Protocol
Name=Player
Map=UT-Logo-Map.unr
LocalMap=UT-Exo-Map1.unr
.....

Re: how to have fireflies in a map

Posted: Sun Nov 26, 2023 9:57 am
by Red_Fist
What about using the display property in actor multi-skin thing ?
I have not tried anything yet.

Re: how to have fireflies in a map

Posted: Mon Nov 27, 2023 10:15 pm
by sektor2111
If memory doesn't cheat me "multiskins" are usable for actors having certain mesh, not really using "DT_Sprite".
I used those "multiskins" for some monsters. "Multiskins" for "sprite" actors are good for hosting references to a Texture that is not in map, but used by whatever things that spawn in run-time for making sure that "custom" run-time actor will get skinned as it should. At least for original UT this is one of my practices for preventing MyLevel things to be gone when Editor is closed.