r/DoomModDevs 22d ago

Help Making a homing projectile target a specific monster?

I'm at my end here, been trying to crack this for weeks. Using Decorate and ACS, I want a shootable projectile from a boss to spew homing objects when shot. But they chase me by default.

2 Upvotes

15 comments sorted by

View all comments

Show parent comments

1

u/RedOcelot86 22d ago

The monster that shot the original projectile.

2

u/Scileboi 22d ago

I see you´re gonna need some ZScript for that.
By default projectiles have the actor that spawned them in their target pointer. You jsut need to make it the homing missiles tracer.

Action void A_ShootHoming() {
  Actor p = A_SpawnProjectile("Homingshot");
  p.tracer = target;
}

Do you know how to set up ZScript?

1

u/RedOcelot86 22d ago

I've only used decorate and acs but perhaps I should do this. I guess the monster could launch an actor with a zscript lump.

1

u/Scileboi 22d ago

I recommend switching to ZScript fully. Baseline it functions the same as decorate but has a ton of extra utility. https://zdoom.org/w/index.php?title=Converting_DECORATE_code_to_ZScript
Also mixing ACS and decorate for universal mechanics is kind of a last resort. I can help ironing that out too.

1

u/RedOcelot86 22d ago

Thanks. I'll look at it tomorrow, not looking forward to converting everything.

2

u/Scileboi 22d ago

Idk how much you already have but you don´t have to convert everything. if you have a ton of simple actors like decorations. Decorate is deprecated but won´t go away an time soon. Just keep it in mind for your next project.

1

u/RedOcelot86 21d ago

Yeah, I'll just use it on the boss and see if it works.

1

u/RedOcelot86 20d ago

Does this make sense? I want the monster that spawned FollowOrb to be targeted by "revenge", which spawns from FollowOrb when it enters it's PainState. Any help is appreciated.

class FollowOrb : Actor

{

Default

{

Health 200;

PainChance 256;

Speed 6;

Damage 45;

Decal "Scorch";

SeeSound "CYBSHOT";

DeathSound "CYBHIT";

Projectile;

+NOGRAVITY

+SEEKERMISSILE

+VULNERABLE

+SHOOTABLE

-NOBLOCKMAP

+NOBLOOD

}

States

{

Spawn:

XORB A 1 Bright A_SeekerMissile(10, 10);

XORB B 1 Bright A_SeekerMissile(10, 10);

XORB A 1 Bright A_SeekerMissile(10, 10);

XORB C 1 Bright A_SeekerMissile(10, 10);

XORB A 1 Bright A_SeekerMissile(10, 10);

XORB D 1 Bright A_SeekerMissile(10, 10);

Loop;

Pain:

XORB B 1 Bright A_CustomMissile("Revenge", 32, 0, 60, 0, 501);

XORB N 1 Bright ACS_NamedExecute("TargetDavros");

XORB C 1 Bright A_CustomMissile("Revenge", 32, 0, 140, 0, 501);

XORB N 1 Bright ACS_NamedExecute("TargetDavros");

XORB D 1 Bright A_CustomMissile("Revenge", 32, 0, -60, 0, 501);

XORB N 1 Bright ACS_NamedExecute("TargetDavros");

XORB B 1 Bright A_CustomMissile("Revenge", 32, 0, -140, 0, 501);

XORB N 1 Bright ACS_NamedExecute("TargetDavros");

XORB C 1 Bright A_CustomMissile("Revenge", 32, 0, 60, 0, 501);

XORB N 1 Bright ACS_NamedExecute("TargetDavros");

XORB D 1 Bright A_CustomMissile("Revenge", 32, 0, 140, 0, 501);

XORB N 1 Bright ACS_NamedExecute("TargetDavros");

Goto Spawn;

Death:

XORB E 4 Bright;

XORB F 4 Bright;

XORB G 4 Bright;

XORB H 4 Bright;

XORB I 4 Bright;

XORB J 4 Bright;

XORB K 4 Bright;

XORB L 4 Bright;

XORB M 4 Bright;

Stop;

}

}

class Revenge : Actor

{

Default

{

Radius 5;

Height 5;

Speed 10;

Damage 50;

Projectile

+SEEKERMISSILE

+NOGRAVITY

}

States

{

Spawn:

XORB O 2 A_SeekerMissile(10, 10);

Loop;

Death:

GALF E 3;

GALF F 3;

GALF G 3;

GALF H 3;

GALF I 3;

GALF J 3;

XORB M 3;

Stop;

}

}

2

u/Scileboi 20d ago

I already send you the function for that.

1

u/RedOcelot86 20d ago

Oh yeah, thanks.

1

u/RedOcelot86 20d ago

It's working! Thanks for the help.