[DECORATE] how do i make a weapon that has laser sighting
Moderator: GZDoom Developers
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
-
- Posts: 53
- Joined: Mon Sep 04, 2023 9:17 am
[DECORATE] how do i make a weapon that has laser sighting
How do i make a weapon that has laser sighting similar to this
You do not have the required permissions to view the files attached to this post.
-
-
- Posts: 1853
- Joined: Sun Jul 21, 2019 8:54 am
Re: [DECORATE] how do i make a weapon that has laser sighting
One way to do this in DECORATE is to create an actor such as this:
And then in your weapon's Ready state fire a 0 damage hitscan attack with that actor set as the bullet puff:
Code: Select all
Actor RedDot
{
+NOGRAVITY
+NOBLOCKMAP
+ALWAYSPUFF
+PUFFONACTORS
+BLOODLESSIMPACT
States
{
Spawn:
TNT1 A 1 NoDelay A_SpawnParticle("red",SPF_FULLBRIGHT,1,10)
Stop
}
}
Code: Select all
Ready:
SHTG A 0 A_FireBullets(0,0,1,0,"RedDot",FBF_NORANDOMPUFFZ)
SHTG A 1 A_WeaponReady
Loop
-
- Posts: 53
- Joined: Mon Sep 04, 2023 9:17 am
Re: [DECORATE] how do i make a weapon that has laser sighting
how do i make the laser sight leave no decalJarewill wrote: ↑Wed Dec 20, 2023 4:08 pm One way to do this in DECORATE is to create an actor such as this:And then in your weapon's Ready state fire a 0 damage hitscan attack with that actor set as the bullet puff:Code: Select all
Actor RedDot { +NOGRAVITY +NOBLOCKMAP +ALWAYSPUFF +PUFFONACTORS +BLOODLESSIMPACT States { Spawn: TNT1 A 1 NoDelay A_SpawnParticle("red",SPF_FULLBRIGHT,1,10) Stop } }
Code: Select all
Ready: SHTG A 0 A_FireBullets(0,0,1,0,"RedDot",FBF_NORANDOMPUFFZ) SHTG A 1 A_WeaponReady Loop
-
-
- Posts: 1853
- Joined: Sun Jul 21, 2019 8:54 am
Re: [DECORATE] how do i make a weapon that has laser sighting
Instead of making the gun leave the decal, make the bullet puff leave it.
So remove the decal definition from your weapon and create a custom puff that leaves it instead:
Actor NewBulletPuff : BulletPuff {Decal BulletChip}
Then make your weapon use this new puff.
So remove the decal definition from your weapon and create a custom puff that leaves it instead:
Actor NewBulletPuff : BulletPuff {Decal BulletChip}
Then make your weapon use this new puff.
-
- Posts: 53
- Joined: Mon Sep 04, 2023 9:17 am
Re: [DECORATE] how do i make a weapon that has laser sighting
Thanks dude!Jarewill wrote: ↑Thu Dec 21, 2023 6:13 pm Instead of making the gun leave the decal, make the bullet puff leave it.
So remove the decal definition from your weapon and create a custom puff that leaves it instead:
Actor NewBulletPuff : BulletPuff {Decal BulletChip}
Then make your weapon use this new puff.