Is there a way to terminate a running daz script?

Is there a function to kill or terminate a running daz script?

Comments

  • Richard HaseltineRichard Haseltine Posts: 100,941

    In DS itself or in the ScriptIDE? In the IDE the debugger can pause a script and then the stop command can be entered in the console (I can't recall the syntax offhand but there was a thread on this).

  • DafaDafa Posts: 97

    I mean programmatically - is there a kill DzScript function? I'm searching through the documentation but I haven't found anything yet.

  • OmnifluxOmniflux Posts: 377

    See this older thread: How to terminate script execution from within DazScript?

    You probably want to be wrapping your entire script in an anonymous function anyway (It's so common, there is a template build into the editor: Edit -> Function -> Wrap in Anonymous) which gets you half way there.

    Are you nested deep at the point you want to exit? Drop all your code in a try catch block, and throw to get out.

  • DafaDafa Posts: 97

    Yes, I see what you mean. Thanks.

Sign In or Register to comment.