Jump to content

Events and Child Events


agentcallooh

Recommended Posts

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 :( 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by BravoTaco
  • Like 1
Link to comment
Share on other sites

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)

Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...