Jump to content

Child script executes Parent script's event also?


Guest

Recommended Posts

Posted

Even if Child script doesnt have same event, Child script executes Parent script's event?

  • 2 weeks later...
Posted
On 2/28/2024 at 11:14 AM, gebesa7147 said:

Even if Child script doesnt have same event, Child script executes Parent script's event?

 

Yes, if the child script does not (re)define the event, the parent's script's code is used.

E.g. if `someevent()' exists in the parent then in the child not having any code for `someevent' is the same as having:

Event SomeEvent()

  parent.SomeEvent()

EndEvent

If you don't want that redefine the event as an empty one:

Event SomeEvent()

EndEvent

 

Posted
9 hours ago, MTB said:

 

Yes, if the child script does not (re)define the event, the parent's script's code is used.

E.g. if `someevent()' exists in the parent then in the child not having any code for `someevent' is the same as having:

Event SomeEvent()

  parent.SomeEvent()

EndEvent

If you don't want that redefine the event as an empty one:

Event SomeEvent()

EndEvent

 

 

Thank you for answer ))

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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