Enemies with secondary fire
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: 192
- Joined: Fri Jun 16, 2017 3:07 pm
- Location: Argentina
Enemies with secondary fire
Is there any mod where enemies have a secondary fire? or is it possible to make that the enemies throw grenades?
-
- Posts: 260
- Joined: Tue Jan 19, 2010 5:07 pm
Re: Enemies with secondary fire
Well, of course, yes. If you want to make a monster have two different attacks, just do something like this:
Use A_Jump. You'll have to use A_SpawnProjectile to spawn grenades.
Code: Select all
Missile:
TNT1 A 0 A_Jump (256, "Attack1", "Attack2")
Attack1:
POSS E 10 A_FaceTarget
POSS F 8 A_PosAttack
POSS E 8
Goto See
Attack2:
POSS E 10 A_FaceTarget
POSS F 10 Bright A_SPosAttackUseAtkSound
POSS E 10
Goto See
-
- Posts: 192
- Joined: Fri Jun 16, 2017 3:07 pm
- Location: Argentina
Re: Enemies with secondary fire
Thankskrokots wrote:Well, of course, yes. If you want to make a monster have two different attacks, just do something like this:Code: Select all
Missile: TNT1 A 0 A_Jump (256, "Attack1", "Attack2") Attack1: POSS E 10 A_FaceTarget POSS F 8 A_PosAttack POSS E 8 Goto See Attack2: POSS E 10 A_FaceTarget POSS F 10 Bright A_SPosAttackUseAtkSound POSS E 10 Goto See
Use A_Jump. You'll have to use A_SpawnProjectile to spawn grenades.
