So I've been working on a flare gun for awhile and I've almost got it working. It's not really a weapon like in Blood, but more like a tool that lights up dark areas. I've gotten the projectile firing working, it has an arc and bounces off walls and stuff. All I want to do now is give the flare itself some particle effects like sparks and smoke, but I can't seem to figure out how to do that. Below is all my code for the Flare that I have so far. Flare is the flare itself. The states are crazy because it's supposed to last 30 seconds before going out. If there is a way to condense that, I would like to know. Flare2 are the sparks and Flare3 is the smoke. I've messed around with things like A_ThrowGrenade and A_SpawnProjectile but was unable to get the desired results. I want the sparks to fly out from the flare in any direction in a small arc, and the smoke to rise up from the flare before disappearing. Any suggestions on how to do this?
Question
asd1994
So I've been working on a flare gun for awhile and I've almost got it working. It's not really a weapon like in Blood, but more like a tool that lights up dark areas. I've gotten the projectile firing working, it has an arc and bounces off walls and stuff. All I want to do now is give the flare itself some particle effects like sparks and smoke, but I can't seem to figure out how to do that. Below is all my code for the Flare that I have so far. Flare is the flare itself. The states are crazy because it's supposed to last 30 seconds before going out. If there is a way to condense that, I would like to know. Flare2 are the sparks and Flare3 is the smoke. I've messed around with things like A_ThrowGrenade and A_SpawnProjectile but was unable to get the desired results. I want the sparks to fly out from the flare in any direction in a small arc, and the smoke to rise up from the flare before disappearing. Any suggestions on how to do this?
Actor Flare
{
Radius 2
Height 4
Speed 25
Projectile
DamageType Fire
-NoGravity
+NoExplodeFloor
+NoDamageThrust
+DoomBounce
+BounceOnActors
BounceType Hexen
BounceFactor 0.5
States
{
Spawn:
FLAR A 1
TNT1 A 0 A_PlaySound("Flaregun/ Flare")
FLAR BCDABCDABCDABCDABCDABCDABCDABCDABCD 1 Bright
FLAR ABCDABCDABCDABCDABCDABCDABCDABCDABCD 1 Bright
FLAR ABCDABCDABCDABCDABCDABCDABCDABCDABCD 1 Bright
FLAR ABCDABCDABCDABCDABCDABCDABCDABCDABCD 1 Bright
FLAR ABCDABCDABCDABCDABCDABCDABCDABCDABCD 1 Bright
FLAR ABCDABCDABCDABCDABCDABCDABCDABCDABCD 1 Bright
FLAR ABCDABCDABCDABCDABCDABCDABCDABCDABCD 1 Bright
FLAR ABCDABCDABCDABCDABCDABCDABCDABCDABCD 1 Bright
FLAR ABCDABCDABCDABCDABCDABCDABCDABCDABCD 1 Bright
FLAR ABCDABCDABCDABCDABCDABCDABCDABCDABCD 1 Bright
FLAR ABCDABCDABCDABCDABCDABCDABCDABCDABCD 1 Bright
FLAR ABCDABCDABCDABCDABCDABCDABCDABCDABCD 1 Bright
FLAR ABCDABCDABCDABCDABCDABCDABCDABCDABCD 1 Bright
FLAR ABCDABCDABCDABCDABCDABCDABCDABCDABCD 1 Bright
FLAR ABCDABCDABCDABCDABCDABCDABCDABCDABCD 1 Bright
FLAR ABCDABCDABCDABCDABCDABCDABCDABCDABCD 1 Bright
FLAR ABCDABCDABCDABCDABCDABCDABCDABCDABCD 1 Bright
FLAR ABCDABCDABCDABCDABCDABCDABCDABCDABCD 1 Bright
FLAR ABCDABCDABCDABCDABCDABCDABCDABCDABCD 1 Bright
FLAR ABCDABCDABCDABCDABCDABCDABCDABCDABCD 1 Bright
FLAR ABCDABCDABCDABCDABCDABCDABCDABCDABCD 1 Bright
FLAR ABCDABCDABCDABCDABCDABCDABCDABCDABCD 1 Bright
FLAR ABCDABCDABCDABCDABCDABCDABCDABCDABCD 1 Bright
FLAR ABCDABCDABCDABCDABCDABCDABCDABCDABCD 1 Bright
FLAR ABCDABCDABCDABCDABCDABCDABCDABCDABCD 1 Bright
FLAR ABCDABCDABCDABCDABCDABCDABCDABCDABCD 1 Bright
FLAR ABCDABCDABCDABCDABCDABCDABCDABCDABCD 1 Bright
FLAR ABCDABCDABCDABCDABCDABCDABCDABCDABCD 1 Bright
FLAR ABCDABCDABCDABCDABCDABCDABCDABCDABCD 1 Bright
FLAR ABCDABCDABCDABCD 1 Bright
FLAR ABCDA 1 Bright
TNT1 A 1
Stop
}
}
Actor Flare2
{
Radius 1
Height 1
Speed 25
Projectile
+NoGravity
+Ghost
States
{
Spawn:
TNT1 A 1
FLAR E 5 bright Bright A_ThrowGrenade("Flare3", (random(-8,-16)), (random(-1,1)), (random(-8,8)))
TNT1 A -1
Stop
}
}
Actor Flare3
{
Scale 0.5
RenderStyle "Translucent"
Alpha 0.5
Radius 1
Height 1
Speed 25
Projectile
+NoGravity
+Ghost
States
{
Spawn:
FLAR FGH 10
TNT1 A -1
Stop
}
}
Share this post
Link to post
17 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.