agentcallooh Posted March 9, 2020 Share Posted March 9, 2020 Question about Events, particularly Event.addChild: what is the use and significance, if any, of event children? How does the EventExecutor run child events? How do setFailed/setFinished calls affect this behavior? (I am familiar with the execution flow of Events with the EventExecutor, and generally how custom and built-in events work on OSBot.) Any help on this would be much appreciated. The docs are completely empty and nobody seems to know anything about this Quote Link to comment Share on other sites More sharing options...
Naked Posted March 9, 2020 Share Posted March 9, 2020 Last time i went to a child's event i was told to "get out of the bouncy castle" and "put some clothes on your drunken idiot" 1 Quote Link to comment Share on other sites More sharing options...
Jueix Posted March 9, 2020 Share Posted March 9, 2020 5 hours ago, Naked said: Last time i went to a child's event i was told to "get out of the bouncy castle" and "put some clothes on your drunken idiot" I was once told to name a movie that best described my sex life, Childsplay didn't go down so well. Last Christmas I was so annoyed with my Jimmy Saville advent calender, The flaps only opened from 1 - 16. I'll show my self out. Quote Link to comment Share on other sites More sharing options...
BravoTaco Posted March 10, 2020 Share Posted March 10, 2020 (edited) On 3/8/2020 at 10:29 PM, agentcallooh said: Question about Events, particularly Event.addChild: what is the use and significance, if any, of event children? How does the EventExecutor run child events? How do setFailed/setFinished calls affect this behavior? (I am familiar with the execution flow of Events with the EventExecutor, and generally how custom and built-in events work on OSBot.) Any help on this would be much appreciated. The docs are completely empty and nobody seems to know anything about this Adding children to an event will allow you to run the parent event while also being able to execute the child events so you do not have to call multiple events one after the other. The setFailed and the setFinished method will work as it normally does applying to the current event you are using when calling them. Edited March 10, 2020 by BravoTaco 1 Quote Link to comment Share on other sites More sharing options...
agentcallooh Posted March 10, 2020 Author Share Posted March 10, 2020 8 hours ago, BravoTaco said: Adding children to an event will allow you to run the parent event while also being able to execute the child events so you do not have to call multiple events one after the other. The setFailed and the setFinished method will work as it normally does applying to the current event you are using when calling them. If I'm understanding you right, the EventExecutor will call the parent's execute AND also the child events execute one after the other? I'm not sure I really understand it. Or does the parent have to fail/finish BEFORE the first child begins executing? So for setFailed/setFinished, these don't transfer parent<->child nor affect execution of individual events? (Obviously once something fails/finishes it stops being executed) Quote Link to comment Share on other sites More sharing options...
BravoTaco Posted March 11, 2020 Share Posted March 11, 2020 9 hours ago, agentcallooh said: If I'm understanding you right, the EventExecutor will call the parent's execute AND also the child events execute one after the other? I'm not sure I really understand it. Or does the parent have to fail/finish BEFORE the first child begins executing? So for setFailed/setFinished, these don't transfer parent<->child nor affect execution of individual events? (Obviously once something fails/finishes it stops being executed) I thought it would automatically call the child after the parent has executed but, with some testing it seems that is not the case. So what you will have to do is loop through all the child events and execute them and set them as failed/finished. Using those values you could then execute/end the next child event. Quote Link to comment Share on other sites More sharing options...