All BluePrint childs of cpp script sync bug

i have 2 different blueprint childs
1 set for higher speed than the other
if either of them reach the MovedDistance both will teleport to the new current position and not only the one who reached it

By any chance could you show a video of this along with your code?


h script


cpp script

video

If you delete those from the level and add new ones do you get the same thing?

Yes

Would you mind sending me your project using the following link?
https://gdev.tv/projectupload
Please use File > Zip Project within Unreal as this will ensure only required files are zipped up and things like the Binaries are excluded.

i sent the project,
also another thing that is happening is that i need to compile with live code every time i open to project and it changing all object vars to the script defaults

  1. Have you seen the Live Coding lecture?
  2. You have StartingPos as a global variable. There’s exactly 1 in your program that will be shared by all instances of AMovingPllatform. Make it a member variable so each has their own instance of this variable.
class AMovingPlatform : public AActor
{
    FVector StartingPos; // member variable.
};

i see, thank you very much for your help

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms