Tutorial 1 Part 3 - DotNETTechnical terms used in this tutorial can be found in the glossary. This tutorial shows:
Share valuesEdit "_RO_Player.rol" to be:
Build the project. This time the "_RO_Player.cpp" will contain code to tell ReplicaNet to transmit the changes to the "mPlayerColour" variable. One C++ compiler problem you might see while building is "Skipping... (no relevant changes detected)". This means the C++ compiler doesn't think the file has changed but if it is a compiled ROL output file then sometimes it misses important code changes. It is a good idea to force a compile by choosing to rebuild all the project when this happens. When you run two copies of this tutorial you should see in the output:
This shows the "mPlayerColour" variable is now being transmitted automatically by ReplicaNet. ReplicaNet can also be used to automatically update other types of variables such as position, speed or any other values. This concludes tutorial 1.
|