ZDoom: https://github.com/rheit/zdoom/pull/784
ACC: https://github.com/rheit/acc/pull/60
Original post:
Spoiler:
Moderator: GZDoom Developers
Spoiler:
That works, I think.RaveYard wrote:Anyway... how about calling it "REOPEN"?
Indeed, that would be nice...Nash wrote:Less hacks/workarounds and a proper in-engine solution would be nice, thank you!
Code: Select all
script "something" UNLOADING
{
delay(1);
//Write code here
}
Code: Select all
script "something" REOPEN
{
//Write code here
}
SetActivator(0), nothing to substitute it is required.RaveYard wrote:You can set the activator as world by using SetActivator that fails. It's mentioned under "return value" here: http://zdoom.org/wiki/SetActivator
So you can substitute that by:
1. Terminating scripts that don't belong to player with the lowest player number - but you have to check what is the lowest player number...
2. Checking if there is running script via variable - but you have to make sure to reset it and it's generally messy...
3. Executing another script using ACS_Execute - but that delays execution by a tick...
4. Executing an UNLOAD script with a delay(1) - this one is executed by the world already, so it's probably the best solution...
Well...![]()
Anyway... how about calling it "REOPEN"?
When I was "talking" about substituting, I was referring to a substitution for the world-exclusive version of RETURN script.ZzZombo wrote: SetActivator(0), nothing to substitute it is required.
Graf Zahl wrote: I wouldn't add this to the first post but it needs to be said here, too:
If you want to suggest a workaround for a requested feature please think first if your workaround meets the suggester's needs. I have seen it too many times that some people post stuff that completely ignores the original post's motivation or suggests some laborious things that would be more an annoyance than anything else to do repeatedly. Often these things come equipped with the word 'just' as if it was the most normal thing to do repeated cumbersome routines.
Such posts tend to create tension because the OP might feel ignored on purpose by that. Here's a good example of this kind of behavior which I really don't want to see anymore on the Feature Suggestions forum.
Again, sorry for my inability to properly explain what the substitutions areZzZombo wrote:I can't make sense of your suggestions then. For example, UNLOADING scripts shouldn't have any delays by design, or be called manually.
Spoiler:But I recommend the fourth.
Code: Select all
script 1 UNLOADING
{
delay(1);
//Code goes here
}
Unless proven otherwise, I see this as uncalled for, as I do believe what it does matches exactly your stated needs and goals.Nash wrote:snip
Last time I did this, there was no delay. It runs before autosave is made.NeuralStunner wrote: Also, a delay()ed UNLOADING script does have the problem that it's going to resume 1 tic after the map (re)loads. Yes, for some things, 1 tic of delay can be problematic.
Posts like yours in this thread are exactly why the post Nash quoted exists. In fact, you in particular have a seriously bad habit of violating this guideline repeatedly. Kindly cease this behavior or otherwise stop posting in the Development boards entirely.ZzZombo wrote:Unless proven otherwise, I see this as uncalled for, as I do believe what it does matches exactly your stated needs and goals.