The Black Wyrm Lair Forums
The Black Wyrm's Lair Terms of Use Help Search Members Calendar

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Ally() NPCs spawn expecting to talk
amika
post Jul 8 2016, 08:12 AM
Post #1





Forum Member
Posts: 3
Joined: 6-July 16




Hello! I'm very new to modding, so apologies if I'm missing something really obvious -

I'm messing around and practicing some trickier (for me) stuff by making an NPC with a familiar-like companion whom she can summon using a spell added to her innate list when her sword is equipped.

Since he's summoned, he doesn't move from area to area, so to have him move from area to area, I put this script on my NPC:

CODE
IF
    Global("FZ_Fios_Here","GLOBAL",1)
    !InMyArea("Fiozoch")
THEN
    RESPONSE #100
        MoveGlobalObject("Fiozoch",Myself)
END


My problem is that after he moves, I can no longer control him - he acts like a familiar that was just created with CreateCreature, and the cursor changes to the "talk" cursor whenever I mouse over him.

I'm curious what sort of workarounds are there from modders who have added familiars to NPCs before. Or would it be better to just have him automatically follow his NPC summoner outside of combat? His circle deactivating each time the PC moves a location seems annoying, so this is an option.

EDIT: For now I've just added an ActionOverride to make him Ally() to the player when he's moved, but it seems this doesn't persist through save/reload and I can also definitely see needing to reselect him every time getting sort of old.

EDIT: Never mind, I fixed it. Sort of. His default allegiance needed to be "controlled" and not "ally" in order for him to be selectable on reload. He's still unselected when he appears in the same area as his summoner, but I made him follow her if he gets out of a certain range so it's not required that you select him every time.

last edit: In case anyone has the same problem as me, I also managed to overlook the OnCreation() trigger until now. It works on the actual generation of the creature as well as reloads. I initially had a problem getting his scripts running on him after reload as well (it was set in the override slot) until I put it in the default slot.

This post has been edited by amika: Jul 11 2016, 05:35 AM
Go to the top of the page
 
Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:



- Lo-Fi Version Time is now: 6th November 2024 - 07:31 AM