I am trying to approximate the Wraithverge in DOOM and need for various reasons to create such a weapon from scratch. This weapon should ideally fire a number of fireballs that select targets at random from any bunch of monsters that are visible to the player or within a certain (but large) radius and home in on them. If the missiles could weave about a bit on their way, like real HeXen spirits, then so much the better, but not essential.
I have reviewed some threads that mention homing missiles and got a few ideas; but before spending ages experimenting by trial-and-error, has anybody recently tried to make a weapon that does this reliably (e.g., using the latest GZDoom functionality), and how far did they get? Any ideas or example code would be much appreciated.
Posted: Fri May 05, 2006 8:55 pm
by wildweasel
Unfortunately, the "generic" homing missile method is nowhere close to the way Wraithverge does things. Same goes for Bloodscourge.
Posted: Fri May 05, 2006 9:18 pm
by TheSonOfBaphomet
I've tried this before. Sadly this is the furthest I got.
Spoiler:
ACTOR HomingLauncher : RocketLauncher 2003
{
States
{
Spawn:
LAUN A -1
Loop
Ready:
MISG A 1 A_WeaponReady
Loop
Deselect:
MISG A 1 A_Lower
Loop
Select:
MISG A 1 A_Raise
Loop
Fire:
MISG A 5 Bright
MISG A 20 Bright A_FireCustomMissile("Looker",0,1,0,0)
Goto Ready
}
}
Actor Looker : Rocket
{
States
{
Spawn:
MISL A 25 BRIGHT
MISL A 1 A_CustomMissile("HomingTarget",0,0,0)
Stop
}
}
ACTOR HomingTarget
{
+NOGRAVITY
+NOBLOCKMAP
+LookAllAround
+FRIENDLY
+ISMONSTER
+NOCLIP
States
{
Spawn:
MISL AA 0 A_Look
Goto See
See:
MISL A 0 A_Chase
Goto Missile
Missile:
MISL A 0 A_FaceTarget
MISL A 1 A_CustomMissile("HomingRockets",0,0,0)
Stop
}
}
Actor HomingRockets : Rocket
{
+SEEKERMISSILE
States
{
Spawn:
MISL A 1 A_SeekerMissile(5,5)
Loop
Crash:
Death:
MISL B 4 BRIGHT A_Explode
MISL CD 4 BRIGHT
Stop
}
}
Now while this does work (at close range), the rocket's will turn on you if no monsters are present.
Posted: Sat May 06, 2006 8:14 am
by MartinHowe
Right then, here is something that looks pretty much what I wanted to achieve. The animations and so forth can be fine-tuned as needed, but the real bugbear is getting the spirits to self-destruct when their target is dead or after some random time. I have not tried the MISSILE flag with A_CountDown (or whatever it's called) in case that has side effects, but will probably have a go anyway.
Posted: Sat May 06, 2006 11:24 am
by MartinHowe
I have solved the problem of unused spirits, at least to the extent that it looks reasonably "natural" (or should that be unnatural ); here is the latest version. Any comments or suggestions on how to improve it would be welcome.