GameMaker run code in virtual children?

S

Shadowblitz16

Guest
can someone help me understand how to loop though all the virtual children and run code inside them?
basicly I want to be able to run code in widget that are children of the widget I click on.

each widget has a parent variable pointing to the instance of the parent widget
I want to be able to run code in widget that are children of the widget I click on.

right now I need it for bringing the clicked widget and all its children to the from of the screen
 
Without knowing your code or how your objects are setup, this would be my best guess:

In the event that detects the object has been clicked on:

Code:
with ( [obj_widget] )
{
    if ( parent == other.id )
    {
        // Run code
    }
}
Edit : Obviously replace [obj_widget] with your object name
 
Top