troopi Posted June 18, 2022 Share Posted June 18, 2022 Hello Modders.I have a bit of a conundrum.I created a spell that allows grabbing actors, much like the vampiric one.BUT- it's supposed to only work on dead actors.I tried setting up conditions with the GetDead and the GetActorValue Health <=0They don't work and block the spell completely because both subject and target revert aparently to the caster. It seems this happens because it's a magic effect with concentration+self.On my custom script, to get the grabbed actor, I have to do this: xTargetObj = Game.GetPlayerGrabbedRef() xTarget=xTargetObj as Actor The code works. But having it work on living actors is a game breaker. Even if I interrupt the spell, the grabbed actor is knocked down.How can I solve this?Is there any condition that points out to the "GetPlayerGrabbedRef"?Thanks for any reply, mates. Link to comment Share on other sites More sharing options...
dylbill Posted June 18, 2022 Share Posted June 18, 2022 In the creation kit, for the spell condition check the Swap subject and target box to have it run on the target of the spell instead of the caster. Link to comment Share on other sites More sharing options...
troopi Posted June 19, 2022 Author Share Posted June 19, 2022 (edited) Already tried that. It doesn't work, because, on a concetration+self spell, both subject and target are the same- the caster.To get the grabbed target I must use:xTargetObj = Game.GetPlayerGrabbedRef()xTarget=xTargetObj as Actor Edited June 19, 2022 by troopi Link to comment Share on other sites More sharing options...
troopi Posted June 19, 2022 Author Share Posted June 19, 2022 Solved it. Or better, "cheated it"? XDI'll post here the links to the images and steps, so anyone under the same issues can walk forth.https://www.nexusmods.com/skyrim/images/793964https://www.nexusmods.com/skyrim/images/793965https://www.nexusmods.com/skyrim/images/793966https://www.nexusmods.com/skyrim/images/793968https://www.nexusmods.com/skyrim/images/793969These images from my profile have a register of all the steps.But as a resume, I used the "variable05" on the player actor values to store the state of a target BEFORE the grab.Since "concentration+self" magic cannot get a target, I made a second script magic to cast a "fireandforget+targetactor" in the player's aim, and check if that target is dead or alive. This check changes the "variable05", and the grab magic will only work IF that variable05 is 1 (which will only happen if the target is dead) Link to comment Share on other sites More sharing options...
Sphered Posted June 24, 2022 Share Posted June 24, 2022 Edit. Was thinking dead actor might need telekinesis grab object type instead but nvm it worked with GrabActor for me. Mine has no conditions on the spell, and GetDead() == 1 for the effect. No other conditions I was just testing if this worked at all on bodies Link to comment Share on other sites More sharing options...
Recommended Posts