# Refering to other components

Hello, there.

Is there a way of refering to other components?
e.g.:

Can I make ‘Note2’ say “Well done!” if ‘Maths1’ is correct?

Surely something like:
If ‘Maths1’ Correct, print “Well done!”
Otherwise, print " "

This seems to be a really user-unfriendly language to use!

You need to be specific about what makes Maths1 correct. You can’t access the correct sink in Maths1, but you can create a variable (I use “check=”) then refer to that.

content: when Maths1.script.check "Well done!" otherwise ""


Thanks, Daniel.

I think I’m having multiple conversations with you at the moment(!)

Please would you be able to let me know how to do the “check=”?
Do I type “check=” in the ‘Maths1’ box?
If so, how do I distinguish atwin different “check=” in different boxes?

All best,
Simon

Yes, define check in the math input. You can tell the difference between different checks because you have different input names.

Maths1.script.check” is saying “go to the Maths1 component’s script and grab the variable check .” You can have as many duplicate variable names as you want as long as they are not living in the same component’s CL.

Brilliant! Thanks, Daniel.

I have done this:

“You have scored \frac\${total}{10}.”