A_SeekerMissile?

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
DBThanatos
Posts: 3101
Joined: Fri Apr 14, 2006 3:17 pm
Location: in "the darkness that lurks in our mind"

A_SeekerMissile?

Post by DBThanatos »

I must be doing something terribly wrong for this to happen, but everytime this guy fires the fireballs that are supossed to seek the player(DarkStrongNew), those balls just act like if they were "seeking" the monster.

Is there something too obvious I'm missing?

Code: Select all

actor Hollow 
{
    Health 780
    Radius 20
    Height 64
    Speed 7
    Mass 560
    PainChance 128
    MONSTER 
    +FLOORCLIP
    Scale 1.15
    SeeSound "imp/sight"
    PainSound "imp/pain"
    DeathSound "imp/death"
    ActiveSound "imp/active"
    MeleeSound "imp/melee"
    Obituary "%o now knows that the 'Hollow' is just 'flesh and bones'."
    States
    {
    Spawn:
        DRKV AB 10 A_Look
        Loop
    See:
        DRKV AABBCCDD 3 A_Chase
        Loop
    Missile:
        DRKV E 0 A_Jump(64,"Missile2")
        DRKV EF 6 A_FaceTarget
        DRKV G 0 A_CustomMissile("DarkNormalNew", 32, 0, random(20,-20))
        DRKV G 6 A_CustomMissile("DarkNormalNew", 32, 0, random(20,-20))
        DRKV EF 6 A_FaceTarget
        DRKV G 0 A_CustomMissile("DarkNormalNew", 32, 0, random(20,-20))
        DRKV G 6 A_CustomMissile("DarkNormalNew", 32, 0, random(20,-20))
        DRKV EF 6 A_FaceTarget
        DRKV G 0 A_CustomMissile("DarkNormalNew", 32, 0, random(20,-20))
        DRKV G 6 A_CustomMissile("DarkNormalNew", 32, 0, random(20,-20))
	  DRKV E 0 A_Jump(80,1)
	  Goto See
	  Goto Missile+1
    Missile2:
        DRKV EF 6 A_FaceTarget
        DRKV G 0 A_CustomMissile("DarkStrongNew", 32, 0, 30)
        DRKV G 6 A_CustomMissile("DarkStrongNew", 32, 0,-30)
	  Goto See
    Pain:
        DRKV H 2
        DRKV H 2 A_Pain
        Goto See
    Death:
        DRKV L 8
        DRKV M 8 A_Scream
        DRKV N 5
        DRKV O 5 A_Fall
        DRKV P -1
        Stop
    XDeath:
        DRKI N 5
        DRKI O 5 A_XScream
        DRKI P 5
        DRKI Q 5 A_Fall
        DRKI RST 5
        DRKI U -1
        Stop
    Raise:
        DRKV PO 8
        DRKV NML 6
        Goto See
    }
}

actor DarkNormalNew
{
    Radius 8
    Height 6
    Speed 9
    Damage 8
    PROJECTILE
    RENDERSTYLE ADD
    ALPHA 0.67
    SeeSound "imp/attack"
    DeathSound "imp/shotx"
    Decal DoomImpScorch
    States
    {
    Spawn:
        DKB1 AB 4 Bright
        Loop
    Death:
        DKB1 CDE 4 Bright
        Stop
    }
}

actor DarkStrongNew
{
    Radius 8
    Height 6
    Speed 9
    Damage 10
    PROJECTILE
    RENDERSTYLE ADD
    ALPHA 0.67
    SeeSound "imp/attack"
    DeathSound "imp/shotx"
    MISSILEHEIGHT 0
	+SEEKERMISSILE
    MissileType DarkTailNew
    Decal DoomImpScorch
    States
    {
    Spawn:
        DKB2 A 4 Bright A_SeekerMissile(70,70)
        DKB2 A 0 Bright A_MissileAttack
        DKB2 B 4 Bright A_SeekerMissile(70,70)
        DKB2 B 0 Bright A_MissileAttack
        Loop
    Death:
        DKB2 CDE 4 Bright
        Stop
    }
}

actor DarkTailNew
{
    PROJECTILE
    RENDERSTYLE ADD
    +NOCLIP
    ALPHA 0.5
    States
    {
    Spawn:
        DKBT ABCDEF 2 Bright
        Stop
    }
}

And I included the necesary files to reproduce.




DBT
Attachments
Hollow.zip
The test file
(81.2 KiB) Downloaded 23 times
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Re: A_SeekerMissile?

Post by Matt »

A missile's hate target is the actor that fired it. (It makes sense... I mean, you're brought into the world as this searing burning screaming thing with no clear goal or purpose but to destroy yourself and dissolve into bleak nothingness with only pain and suffering to show for it, how much do you really owe the person who created you? But seriously, though, it's just a shortcut that id used to identify who shot any given projectile back when processors were limited enough that such shortcuts actually helped.)

Your best bet is to use [wiki]A_SpawnItemEx[/wiki] with the momx/momy/momz [wiki=A_JumpIf]keywords[/wiki] to spawn the sub-projectiles. They'll just shoot wherever the projectile happens to be moving rather than directly at the player, but it's better than either towards the original shooter or straight ahead with no Z adjustment.
User avatar
DBThanatos
Posts: 3101
Joined: Fri Apr 14, 2006 3:17 pm
Location: in "the darkness that lurks in our mind"

Re: A_SeekerMissile?

Post by DBThanatos »

I think I see what you mean, however I'm still confused why this happened! I mean, in another 50 monsters which use seeker missiles, none shown this kind of problem, that is why I'm really inclined to think I did something different this time, but I just cant find it.


DBT
User avatar
Amuscaria
Posts: 6634
Joined: Mon Jul 26, 2004 12:59 pm
Location: Growing from mycelium near you.

Re: A_SeekerMissile?

Post by Amuscaria »

This probably has nothing to do with it, but dont the first parameter in A_SeekerMissile have to be smaller than the second. Maybe you can try (70,71)?
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Re: A_SeekerMissile?

Post by Matt »

There's nothing wrong with the seekermissile call. Other seekers work because they don't fire a missile directly at their target. If I understand the logic correctly, after it fires the missile, it's left facing the target, meaning that it will propel itself accordingly - i.e., back to its shooter.

If you really need to use a missile attack, you'll need A_CustomMissile aimmode 2 which tells the actor to shoot straight ahead without aiming at anything. Problem is, if the tail's moving as well it won't move along the Z axis. Which is why I'd try something like this:


DKB2 A 0 Bright [wiki]A_SpawnItemEx[/wiki] ("DarkTailNew",0,0,0,momx*0.3,momy*0.3,momz*0.3,0,40)


EDIT: Fixed so it doesn't imply you were originally using [wiki]A_CustomMissile[/wiki]. Speaking of which, try to avoid A_MissileAttack since that is deprecated.
Last edited by Matt on Sat Dec 01, 2007 9:31 pm, edited 2 times in total.
User avatar
Unknown_Assassin
Posts: 2468
Joined: Wed Apr 12, 2006 5:17 pm
Location: Where dead carcasses lie
Contact:

Re: A_SeekerMissile?

Post by Unknown_Assassin »

The problem is your A_Missileattack that is under A_Seekermissile. That should be removed. If you want 4 fireballs spawned, define the 4 with A_Seekermissile.
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Re: A_SeekerMissile?

Post by Matt »

Unknown_Assassin wrote:The problem is your A_Missileattack that is under A_Seekermissile. That should be removed. If you want 4 fireballs spawned, define the 4 with A_Seekermissile.
......I don't get it.
User avatar
Unknown_Assassin
Posts: 2468
Joined: Wed Apr 12, 2006 5:17 pm
Location: Where dead carcasses lie
Contact:

Re: A_SeekerMissile?

Post by Unknown_Assassin »

Vaecrius wrote:......I don't get it.
I believe that A_Missileattack is only for monsters, seeing that it is defined as "launches a missile," while the A_Seekermissile can only define the missile.

To be honest, I see no difference between using A_CustomMissile and A_Seekermissile and A_MissileAttack and A_SeekerMissile. For A_MissileAttack, you have to define the missiletype and the missileheight. It is the same thing as A_CustomMissile.
User avatar
DBThanatos
Posts: 3101
Joined: Fri Apr 14, 2006 3:17 pm
Location: in "the darkness that lurks in our mind"

Re: A_SeekerMissile?

Post by DBThanatos »

I wrote:Is there something too obvious I'm missing?
Unknown_Assassin wrote:I believe that A_Missileattack is only for monsters
I used that method... because of lazyness, as you see the actor itself is just a modified version of the VoidDarkImp, and considering I downloaded it from t667 realm and I didnt take the time to modify much... (even the names; if you check it, i just added the part "new" at the end of the names! :LAZY!: )

Anyway, UA: You are right!! changing the A_missileattack with A_CustomMissile(blah...) solved the problem!!

Thanks! (I even gave up some hours ago and changed the attack, I might re implement this one :D)


DBT
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Re: A_SeekerMissile?

Post by Matt »

All you did was change A_MissileAttack to A_CustomMissile and it did the trick?

Don't mind posting the revised bit of code for the rest of us? ^^;
User avatar
DBThanatos
Posts: 3101
Joined: Fri Apr 14, 2006 3:17 pm
Location: in "the darkness that lurks in our mind"

Re: A_SeekerMissile?

Post by DBThanatos »

Code: Select all

actor DarkStrongNew
{
    Radius 8
    Height 6
    Speed 9
    Damage 10
    PROJECTILE
    RENDERSTYLE ADD
    ALPHA 0.67
    SeeSound "imp/attack"
    DeathSound "imp/shotx"
    //MISSILEHEIGHT 0
	+SEEKERMISSILE
    //MissileType DarkTailNew
    Decal DoomImpScorch
    States
    {
    Spawn:
        DKB2 A 4 Bright A_SeekerMissile(70,70)
        DKB2 A 0 Bright A_CustomMissile("DarkTailNew",0,0,0)
        DKB2 B 4 Bright A_SeekerMissile(70,70)
        DKB2 B 0 Bright A_CustomMissile("DarkTailNew",0,0,0)
        Loop
    Death:
        DKB2 CDE 4 Bright
        Stop
    }
}
And voila!! :cheers:


DBT
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Re: A_SeekerMissile?

Post by Matt »

So A_MissileAttack really does cover something else from A_CustomMissile. :shock:

I have no idea what the ramifications of this are.

EDIT: Updated the [wiki="A_MissileAttack"]wiki[/wiki]
Last edited by Matt on Sun Dec 02, 2007 7:08 pm, edited 1 time in total.
User avatar
Unknown_Assassin
Posts: 2468
Joined: Wed Apr 12, 2006 5:17 pm
Location: Where dead carcasses lie
Contact:

Re: A_SeekerMissile?

Post by Unknown_Assassin »

DBThantos wrote:Anyway, UA: You are right!! changing the A_missileattack with A_CustomMissile(blah...) solved the problem!!
For your code, if you have A_Custommissile, I don't think you need the Missileheight and the Missiletype. It is already defined in your A_Custommissile's parameters.
User avatar
DBThanatos
Posts: 3101
Joined: Fri Apr 14, 2006 3:17 pm
Location: in "the darkness that lurks in our mind"

Re: A_SeekerMissile?

Post by DBThanatos »

im telling you im very lazy :P i just commented those lines (instead of deleting :mrgreen: )

EDIT: Ok, here is with those extra lines deleted

Code: Select all

actor DarkStrongNew
{
    Radius 8
    Height 6
    Speed 9
    Damage 10
    PROJECTILE
    RENDERSTYLE ADD
    ALPHA 0.67
    SeeSound "imp/attack"
    DeathSound "imp/shotx"
   +SEEKERMISSILE
    Decal DoomImpScorch
    States
    {
    Spawn:
        DKB2 A 4 Bright A_SeekerMissile(70,70)
        DKB2 A 0 Bright A_CustomMissile("DarkTailNew",0,0,0)
        DKB2 B 4 Bright A_SeekerMissile(70,70)
        DKB2 B 0 Bright A_CustomMissile("DarkTailNew",0,0,0)
        Loop
    Death:
        DKB2 CDE 4 Bright
        Stop
    }
}
DBT
Locked

Return to “Editing (Archive)”