EddieTheEagle Posted April 22, 2020 Share Posted April 22, 2020 (edited) I'm trying to create a script that replaces an actor with another actor now to make it looks less stupid I'm applying a EffectShader to the first actor and then replacing it with the new actor.The problem is once I disable the first actor the effectshader instantly goes away. Is there a different way to apply this effectshader without it getting removed instantly?I've to disable the first actor first or the other actor will spawn in a completely different location which is not what I want.I've tried finding a fix for this for several hours without any luck.Video of what happens atm: ttps://imgur.com/a/140sDjKCurrent Code: Event OnEffectStart(Actor akTarget, Actor akCaster) InvisFloor.MoveTo(akTarget as objectreference, 0.000000, 0.000000, -25.000000, true) InvisFloor.Enable(false) FX5.Play(akTarget,10.0) utility.wait(3.0) akTarget.Disable() akTarget.Delete() NewActor = InvisFloor.PlaceActorAtMe(ReplacementActor) FX5.Play(NewActor,10.0) EndEvent Edited April 22, 2020 by EddieTheEagle Link to comment Share on other sites More sharing options...
ReDragon2013 Posted April 22, 2020 Share Posted April 22, 2020 suggestion only ; move invisible floor object to target InvisFloor.MoveTo(akTarget as Objectreference, 0.0, 0.0, -25.0, TRUE) ; https://www.creationkit.com/index.php?title=Play_-_EffectShader FX5.Play(akTarget) ; play FX effect, endless aRef.SetGhost(TRUE) ; make actor a ghost ; switch floor on InvisFloor.Enable(False) Utility.Wait(3.0) ; wait 3 sec ; place new actor at floor NewActor = InvisFloor.PlaceActorAtMe(ReplacementActor) FX5.Play(NewActor, 10.0) ; play fx on new actor for 10 sec FX5.Stop(akTarget) ; stop FX effect akTarget.DisableNoWait() ; disable target immediately akTarget.Delete() ; mark target for delete Link to comment Share on other sites More sharing options...
maxarturo Posted April 23, 2020 Share Posted April 23, 2020 (edited) You need to break down / separate it into 3 element, each element has to be independent from the other. 1) Dead actor > plays its own fx. 2) A stand alone FX that it will play either at a "Pre Placed xMarker" or at a "Pre Placed Invisible Actor", the FX will play from the start of your "Casted Spell" till its end. The FX that will play must have its "FadeNode" at a ground level otherwise the replacer actor will spawn wherever the "Node" is. This means that if you place the FX to play at an X# of the Dead actors Z axis, the replacer actor will spawn at that Z axis height. There is also the option to make it an "FX Activator", but this needs some knowledge of some external programs. 3) The replacer actor must have the same FX playing as the 1st actor, so that it can't be distinguished easily. In order for the replacer actor to not spawn somewhere else you need to move him not to the "Actor A" but to the "FX" that is playing (#2) at the "Actor A" position/location. Here is where the "FadeNode" plays significant role. 4) Your script should handle each element autonomously. a- Place #2 b- Place #3 c- Remove #1 * This is the only simplest way to do this. There is a way to do this very precise and flawlessly, but things becomes way too complicated. Edited April 23, 2020 by maxarturo Link to comment Share on other sites More sharing options...
Recommended Posts