antstubell Posted November 1, 2019 Share Posted November 1, 2019 To the point - I don't get this error.Script - Actor Property PlayerRef AutoIdle Property Knockdown AutoIdle Property GetUp AutoImageSpaceModifier Property StrikeFall AutoImageSpaceModifier Property WakeUp AutoInt Property DamageValue AutoObjectReference Property MoveToMarker AutoSound Property My_Knockout1 AutoSound Property My_DragFootstepDrag1 AutoSound Property My_BodyDropGravel1 AutoEVENT onTriggerEnter(ObjectReference akActionRef)if akActionRef == PlayerRefGame.ForceFirstPerson()My_Knockout1.play(self)StrikeFall.apply()Game.DisablePlayerControls()PlayerRef.PlayIdle(Knockdown)utility.Wait(7)My_DragFootstepDrag1.play(self)utility.Wait(7)My_BodyDropGravel1.play(self)utility.Wait(3)PlayerRef.MoveTo(MoveToMarker)WakeUp.ApplyCrossFade()PlayerRef.PlayIdle(GetUp)PlayerREF.DamageActorValue("Health", DamageValue)WakeUp.RemoveCrossFade()Game.EnablePlayerControls()Self.Disable()EndifEndEvent Error - (30,7): cannot call the global function RemoveCrossFade on the variable ::WakeUp_var, must call it alone or on a type Link to comment Share on other sites More sharing options...
maxarturo Posted November 3, 2019 Share Posted November 3, 2019 (edited) First of all it's highly recommended to use no more than 3 " ImageSpaceModifier " in one script or firing at the same time, the reason behind this is that you can't not specify in Papyrus which " ImageSpaceModifier " to stop since the STOP script function is the same apply to all " ImageSpaceModifier ". I've encounter weird issues while testing/experimenting with this, example : two " ImageSpaceModifier " running at the same time but the STOP function couldn't identify which one to stop, so it ended up removing twice the same " ImageSpaceModifier ". The 3 " ImageSpaceModifier " in the same script should be apply as follow : - ImageSpaceModifier = any, no special requirements. - Fade in = this ImageSpaceModifier should be one of the two opposites that will be running, the first will CANCEL the second. Fade in to Black - Fade out = this ImageSpaceModifier should be one of the two opposites that will be running, this will get CANCEL/REMOVE by the above. Fade out from Black * You can have multiple ImageSpaceModifier in one script, but you should be very careful that each one of them is cancel/stop before the next is applied, " in sequences ". To your issue : WakeUp.ApplyCrossFade(0.5) ImageSpaceModifier.RemoveCrossFade(0.5) * Also it should always have a Cross Fade Time pre fixed (afFadeDuration) otherwise by default if no time has been set, it will apply a 1 sec Cross Fade. Edited November 3, 2019 by maxarturo Link to comment Share on other sites More sharing options...
antstubell Posted November 4, 2019 Author Share Posted November 4, 2019 I thought this would work as it is line for line taken from the Thieves Guild quest where player is hit by poison arrow, falls, black outs and is moved to exterior cell. I must have missed something or as you suggested and is actually done in CK - the complete sequence is split over not only 2 scripts but 2 quests. The two lines you posted- WakeUp.ApplyCrossFade(0.5)ImageSpaceModifier.RemoveCrossFade(0.5) does not solve the issue.So I thought I would, like the game does, split the sequence/scene over two scripts. The first script is up to the point of where player is knocked out and is moved to exterior cell - I know there are unused properties in the script I haven't gotten around to tidying it up after splitting it. Actor Property PlayerRef AutoIdle Property Knockdown AutoIdle Property GetUp AutoImageSpaceModifier Property StrikeFall AutoImageSpaceModifier Property WakeUp AutoInt Property DamageValue AutoObjectReference Property MoveToMarker AutoSound Property My_Knockout1 AutoSound Property My_DragFootstepDrag1 AutoSound Property My_BodyDropGravel1 AutoEVENT onTriggerEnter(ObjectReference akActionRef)if akActionRef == PlayerRefGame.ForceFirstPerson()My_Knockout1.play(self)StrikeFall.apply()Game.DisablePlayerControls()PlayerRef.PlayIdle(Knockdown)utility.Wait(7)My_DragFootstepDrag1.play(self)utility.Wait(7)My_BodyDropGravel1.play(self)utility.Wait(2)PlayerRef.MoveTo(MoveToMarker)Utility.wait(0.5)Self.Disable()EndifEndEvent Player is now outside so let's wake him/her up. Actor Property PlayerRef AutoIdle Property GetUp AutoImageSpaceModifier Property WakeUp AutoInt Property DamageValue AutoEVENT onTriggerEnter(ObjectReference akActionRef)if akActionRef == PlayerRef;--- Previous Script Line Was MoveTo -------------------------WakeUp.ApplyCrossFade(0.5)ImageSpaceModifier.RemoveCrossFade(0.5)PlayerRef.PlayIdle(GetUp)PlayerREF.DamageActorValue("Health", DamageValue)Game.EnablePlayerControls()Self.Disable()EndifEndEvent No different - same issue. Link to comment Share on other sites More sharing options...
maxarturo Posted November 5, 2019 Share Posted November 5, 2019 (edited) I suspect your issue is the same as with : Sound Property MySoundFX Auto int instanceID instanceID = MySoundFX.Play(game.getPlayer()) Sound.StopInstance(instanceID) The sound is stored inside the script/activator or whatever else is calling the function, so can not call the " Sound.StopInstance(instanceID) " from an other script/activator etc.. it must be call by the same script/activator in which the sound was stored. The same principle applies for Visual FXs. In order to make your idea/script to work correctly you need to detach the " ImageSpaceModifier " from both of your scripts. You have two alternatives. A) Let the "ImageSpaceModifier" to be handled from within your script fragment, through quest stages. B) Make a third script that will add/remove the "ImageSpaceModifier". This script can be living in a "xMarker Activator" that upon getting activated from your first script will apply the first "ImageSpaceModifier", and then uppon getting activated a second time by your second script will apply your second "ImageSpaceModifier". For this script you can use the same simple principle as the " Vampire coffin with SLEEP " script. Example : bool Property isTriggered = false auto hidden Auto STATE waiting Event OnActivate(ObjectReference akActionRef) If ( !isTriggered ) ; IT"S ACTIVATED BY YOUR FIRST SCRIPT isTriggered = True APPLY YOUR FADE IN IMAGESPACEMODIFIER GoToState("waiting") elseif ( isTriggered ) ; IT"S ACTIVATED BY YOUR SECOND SCRIPT isTriggered = False APPLY YOUR FADE OUT IMAGESPACEMODIFIER GoToState("AllDone") EndIf EndEvent EndState State AllDone Event OnCellDetach() Self.Disable() Self.Delete() EndEvent EndState I hope it helps... Edit : Now that i thought about it a little bit more... everything can be handle by the same script living inside the "xMarker Activator", you just need to activated twice, one in each cell. So, instead of three scripts you will only have one doing all the work. Edited November 5, 2019 by maxarturo Link to comment Share on other sites More sharing options...
Recommended Posts