Communicating between scripts

Have you tried looking into events?

for c++