michaelcoolis Posted May 5, 2020 Share Posted May 5, 2020 Hi there, I'm trying to get a spell I have written in the creation kit to work. The spell is meant to place undead under the control of the player, like the "command daedra" spell but for undead. I have written the following script to do it, based on the wood elf racial ability to control animals: =============================================================Scriptname mcsCommandUndeadScript extends ActiveMagicEffect Faction Property CharmFaction Autobool Property bMakePlayerTeammate = false Auto Event OnEffectStart(Actor akTarget, Actor akCaster)akTarget.AddToFaction(CharmFaction)akCaster.StopCombat()akTarget.StopCombat()if bMakePlayerTeammateakTarget.SetPlayerTeammate(true, false)endifEndEvent Event OnEffectFinish(Actor akTarget, Actor akCaster)akTarget.RemoveFromFaction(CharmFaction)if bMakePlayerTeammateakTarget.SetPlayerTeammate(false, false)endifEndEvent============================================================= I have no idea why this isn't working. Can someone help? I'm new to scripting btw, so sorry if it's something very basic. Link to comment Share on other sites More sharing options...
dylbill Posted May 5, 2020 Share Posted May 5, 2020 Try changing bMakePlayerTeammate = false to bMakePlayerTeammate = true Link to comment Share on other sites More sharing options...
Recommended Posts