We know that ACS_ExecuteAlways can't be terminated via ACS_Terminate but is there any other way?
I maked much of scripts and decorate connected via ACS_Execute and ACS_Terminate and i want this scripts to have support with multiplayer which requires
ACS_ExecuteAlways.Is there any way to terminate such scripts?
ACS ExecuteAlways and Terminate
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Re: ACS ExecuteAlways and Terminate
I don't know if this would work and its suitability would depend on what you are trying to do but how about having the first "execute always" script listen out for a particular variable and terminate itself when the variable is set to a certain value. Then a second script could set the variable appropriately when you want the first one to terminate.
Re: ACS ExecuteAlways and Terminate
If something has been "ExecuteAlways"'d, you can't terminate it from the outside because you no longer have any definitive way to reference the running script. You would be saying "terminate script 4" but there may be 1, 2, 5, 10, etc. running instances of that script.
The only way such a script will end is if it terminates itself, either by reaching the bottom of the script or by use of the terminate keyword (which immediately ends the current script).
The only way such a script will end is if it terminates itself, either by reaching the bottom of the script or by use of the terminate keyword (which immediately ends the current script).
Re: ACS ExecuteAlways and Terminate
So, what I suggested should work, right? If the execute-always script is sitting in a loop waiting for the variable to be set and, when it is, it leaves the loop and goes to a terminate instruction/ the end of the script?
Re: ACS ExecuteAlways and Terminate
Yes it should work i find that in the end of ACS_ExecuteAlways paragrath in wiki.
Re: ACS ExecuteAlways and Terminate
Provided you structure it so that toggling the variable doesn't end every instance of the script but just the specific one you want (i.e. the one for the desired player).Enjay wrote:So, what I suggested should work, right? If the execute-always script is sitting in a loop waiting for the variable to be set and, when it is, it leaves the loop and goes to a terminate instruction/ the end of the script?
Re: ACS ExecuteAlways and Terminate
Ah yes. I was forgetting about the possibility of multiple instances of the script which, given that it is being executed by "always" is likely.