Code: Select all
ATEN A 1 A_SpawnProjectile("Gau8Projectile", -40, 0, random (-1, 1), CMF_OFFSETPITCH , -2)
- This seams to be the only flag Worth noting as what I was originally aiming for and what Should have happened is:
- The monster in question is firing from above moving towards the target
- A large barrage of bullets hits according to the target's location + the pitch offset, the +value should bring it down by some value which would impact BEFORE the target
- As the barrage continues, the values are close to zero( on target)
- As it ends, the projectiles have a -value, meaning they are supposed to end AFTER/behind the target
------------ 28-----------------------
----------- 2627 ---------------------
---------- 24 25 -------------------
--------- 20 21 22 -----------------
------ 16 17(x )18 19 ---------------
-------- 12 13 14 15----------------
--------- 7 8 9 10 ------------------
---------- 4 5 6 -------------------
----------- 123 --------------------
--------------------------------------
Code: Select all
ACTOR A10Strike
{
Radius 1
Height 2
Speed 45
FastSpeed 45
Health 400
MONSTER
+ALWAYSFAST
// +MISSILE
+NOGRAVITY
+Friendly
+NOBLOOD
// +LOOKALLAROUND
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_PlaySound("A10FLY")
ATEN A 10
ATEN A 1 Thing_Hate (0, 967, 5)
ATEN A 1 A_Look
Goto See
See:
TNT1 A 0
ATEN A 1 A_Chase( 0, "Fire" , CHF_NORANDOMTURN | CHF_DONTTURN | CHF_NODIRECTIONTURN)
Fire:
TNT1 A 0 A_PlaySound("A10/A10FIR", 1, 1.0)
ATEN A 1 A_SpawnProjectile("Gau8Projectile", -40, 0, random (-1, 1), CMF_OFFSETPITCH , -2)
ATEN AA 0 A_SpawnItemEx("YellowFlareSpawn",0,0,0,0)
ATEN A 0 A_SpawnItemEx("GunFireSmoke", 0, 0, 0, 0, 0, 0)
ATEN A 0 A_SpawnItemEx("PlayerMuzzle2", 0, 0, 60)
ATEN A 1 A_SpawnProjectile("DecorativeA10", -40, 0, random (-0.5,0.5), CMF_TRACKOWNER , 2)
ATEN A 1 A_SpawnProjectile("Gau8Projectile", -40, 0, random (-1, 1), CMF_OFFSETPITCH, -4)
ATEN AA 0 A_SpawnItemEx("YellowFlareSpawn",0,0,0,0)
ATEN A 0 A_SpawnItemEx("GunFireSmoke", 0, 0, 0, 0, 0, 0)
ATEN A 0 A_SpawnItemEx("PlayerMuzzle2", 0, 0, 60)
ATEN A 1 A_SpawnProjectile("DecorativeA10", -40, 0, random (-0.5,0.5), CMF_TRACKOWNER , 4)
ATEN A 1 A_SpawnProjectile("Gau8Projectile", -40, 0, random (-1, 1), CMF_OFFSETPITCH , -6)
ATEN AA 0 A_SpawnItemEx("YellowFlareSpawn",0,0,0,0)
ATEN A 0 A_SpawnItemEx("GunFireSmoke", 0, 0, 0, 0, 0, 0)
ATEN A 0 A_SpawnItemEx("PlayerMuzzle2", 0, 0, 60)
ATEN A 1 A_SpawnProjectile("DecorativeA10", -40, 0, random (-0.5,0.5), CMF_TRACKOWNER , 1.8)
ATEN A 1 A_SpawnProjectile("Gau8Projectile", -40, 0, random (-1, 1), CMF_TRACKOWNER , 1.7)
ATEN AA 0 A_SpawnItemEx("YellowFlareSpawn",0,0,0,0)
ATEN A 0 A_SpawnItemEx("GunFireSmoke", 0, 0, 0, 0, 0, 0)
ATEN A 0 A_SpawnItemEx("PlayerMuzzle2", 0, 0, 60)
ATEN A 1 A_SpawnProjectile("DecorativeA10", -40, 0, random (-0.5,0.5), CMF_TRACKOWNER , random(-1, 1))
Visual representation
https://gfycat.com/InsecureGrandGreendarnerdragonfly
IF not for this function, what alternative can anyone recommend I try that would allow me random(-x, x)angle and pitch deviation from aimed target ?