Jump to content

Make custom conjuration follow caster


Recommended Posts

Hello, I am trying to create a custom conjuration spell that instantiates a new actor and then has the actor follow the caster.

 

Currently, I am adding an AI Follow package to the new actor via scripting, but its target is statically set to the player. I would like the spell to be castable by AI though and result in the conjured companion following the AI caster instead of the player.

 

Is there any way I could set the AI package's target dynamically through scripting? Or is there any way the package target could generically be set to whoever cast the spell?

Link to comment
Share on other sites

Instead of specifying an actor to follow, perhaps you could specify an object instead. The object needs to be a persistent reference of course.

 

Maybe placing the object in the caster's inventory will do the trick. If not, make the object invisible and static and use scripting to move it to the caster's location.

 

I've never tried this before so it will need some investigating on your part. :)

Link to comment
Share on other sites

Lanceor great to see you here once again!!

 

Netramz ... have a look at Fluffy Follower Frill. I know that Contra was using invisible markers for the setting up an ambush stuff but I'm not sure if that method was used for the following part but the FFF scripts may give you some ideas.

Link to comment
Share on other sites

I just realized that I have no clue how to debug this because I have no clue how to make my summon cast my custom spell, even though they generally start casting any available spell to help them in combat when they engage. Anyone have any tips on that part?

 

I'm wondering if this will work, but it may be redundant to set a disposition and faction at the same time: When a custom NPC summon spell is cast, the custom NPC summon's disposition toward the caster is set to 100 and the caster is added to an "NPC Summoner" faction. Then a follow package is added to the summon, the follow package's target is set to "Any Object" the Object ID is "NONE" and the Object Type is "NPCs". I believe this alone should make the custom summon follow any NPC in proximity. Then in the Conditions tab, I add conditions that are ran on the target that are `GetDisposition == 100` and `GetInFaction(*NPC Summoner Faction ID here*) == 1`.

 

I think because I am creating a duplicate of the player using `CreateActorFullCopy`, the duplicate should not inherently hold any disposition values toward any other NPCs? This is based on the assumption that the player character does not obtain its own disposition values, but that only NPCs obtain dispositions toward the player and other NPCs. If this is true, I would not need to rely on the NPC Summoner faction at all. Perhaps the faction would come in handy if I was summoning a full actor copy of some other generic NPC though?

 

Thanks all for the feedback, I really appreciate it!

Link to comment
Share on other sites

As a small continuation on my previous post, I attempted to update the spell so there is no unique logic for the player, and so that the custom summon would always choose a target with the follow package I described in the previous post. It appears that a very specific object name and type must be specified for the package in order for it to work. This leads me to wonder if there is any way to dynamically assign an AI package's target while it is being added to an NPC?

Link to comment
Share on other sites

I'm now starting to think I was completely misled by the idea that I could get a single follower package to work that can be applied to every summoned creature and have its target dynamically set. If I am understanding correctly, packages are static and changing the target of a package means that the target will change for all actors with the package assigned.

 

I'm not quite sure where I'll go from here, but I've managed to figure out how to run the creation kit script extender and am looking into different OBSE functions that may be able to help.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...