File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ {
2+ "type" : " EVENT" ,
3+ "color" : [
4+ 255 ,
5+ 0 ,
6+ 0
7+ ],
8+ "title" : " Property Changed" ,
9+ "inputs" : {
10+ "instance" : {
11+ "defaultValue" : " "
12+ }
13+ },
14+ "outputs" : [
15+ " property"
16+ ]
17+ }
Original file line number Diff line number Diff line change 1+ {
2+ "type" : " EVENT" ,
3+ "color" : [
4+ 255 ,
5+ 0 ,
6+ 0
7+ ],
8+ "title" : " Child Added" ,
9+ "inputs" : {
10+ "instance" : {
11+ "defaultValue" : " "
12+ }
13+ },
14+ "outputs" : [
15+ " child"
16+ ]
17+ }
Original file line number Diff line number Diff line change 1+ {
2+ "type" : " EVENT" ,
3+ "color" : [
4+ 255 ,
5+ 0 ,
6+ 0
7+ ],
8+ "title" : " Child Removed" ,
9+ "inputs" : {
10+ "instance" : {
11+ "defaultValue" : " "
12+ }
13+ },
14+ "outputs" : [
15+ " child"
16+ ]
17+ }
Original file line number Diff line number Diff line change 1+ from typing import Optional
2+ from src .Node import Node
3+
4+ class Changed (Node ):
5+ def __init__ (self ) -> None :
6+ super ().__init__ ("nodes/events/changed.json" )
7+ self .events_count = 1
8+
9+ def toLuau (self ) -> Optional [str ]:
10+ instance = self .getInputValue ("instance" )
11+ output_names = [o .name for o in self .outputs ]
12+ args = ", " .join (output_names )
13+
14+ for output in self .outputs :
15+ self .setOutputValue (output .name , output .name )
16+
17+ r = f'{ instance } .Changed:Connect(function({ args } )'
18+
19+ return r
Original file line number Diff line number Diff line change 1+ from typing import Optional
2+ from src .Node import Node
3+
4+ class ChildAdded (Node ):
5+ def __init__ (self ) -> None :
6+ super ().__init__ ("nodes/events/childadded.json" )
7+ self .events_count = 1
8+
9+ def toLuau (self ) -> Optional [str ]:
10+ instance = self .getInputValue ("instance" )
11+ output_names = [o .name for o in self .outputs ]
12+ args = ", " .join (output_names )
13+
14+ for output in self .outputs :
15+ self .setOutputValue (output .name , output .name )
16+
17+ r = f'{ instance } .ChildAdded:Connect(function({ args } )'
18+
19+ return r
Original file line number Diff line number Diff line change 1+ from typing import Optional
2+ from src .Node import Node
3+
4+ class ChildRemoved (Node ):
5+ def __init__ (self ) -> None :
6+ super ().__init__ ("nodes/events/childremoved.json" )
7+ self .events_count = 1
8+
9+ def toLuau (self ) -> Optional [str ]:
10+ instance = self .getInputValue ("instance" )
11+ output_names = [o .name for o in self .outputs ]
12+ args = ", " .join (output_names )
13+
14+ for output in self .outputs :
15+ self .setOutputValue (output .name , output .name )
16+
17+ r = f'{ instance } .ChildRemoved:Connect(function({ args } )'
18+
19+ return r
You can’t perform that action at this time.
0 commit comments