following NPCs

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!
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!)
Post Reply
User avatar
Evatron
Posts: 23
Joined: Wed Mar 25, 2020 11:03 am

following NPCs

Post by Evatron »

Hi there

i was interested in featuring a hostage kind of NPC which would follow the player when triggered. so i did some looking around and came accross this thread from 2012 viewtopic.php?f=3&t=33896
the replies suggest it has been done before and that the code is available somewhere which would be great if i could just copy it. does anyone know about it?

Thanks :thumb:
User avatar
AFADoomer
Posts: 1344
Joined: Tue Jul 15, 2003 4:18 pm
Contact:

Re: following NPCs

Post by AFADoomer »

Blade of Agony has player follower actors... There's some mod-specific code in there, but they could be used as a base.

They have some basic weapon types, Half Life-style "use the annoying NPC to make them stay in place or follow you" handling, and a bunch of other customizable behavior.

These won't be quite plug-and-play for your mod, but would only require a few minor changes to work as-is.

EDIT:
Stripped-down variant attached. Summon 'playerfollower'.
Attachments
PlayerFollower.pk3
(9.7 KiB) Downloaded 83 times
User avatar
Evatron
Posts: 23
Joined: Wed Mar 25, 2020 11:03 am

Re: following NPCs

Post by Evatron »

perfect! that will do nicely thanks!
Post Reply

Return to “Scripting”