Sorry to oppose, but it is a priority issue.
See Maxon’s doc about priorities here.
In the diagram shown there you can see that all tags (expressions) are being executed before any generators. But in your scene you want to use the result of a generator (your matrix object) in a tag/expression (your Xpresso tag).
So leaving the random effector aside, the actual execution order is:
- Priority Expression
- Xpresso tag
- Priority Generators (all generators based on their order in Object Manager)
- Matrix object
- Spline object
But what you need is this order of execution:
- Matrix object
- Xpresso tag
- Spline object
Fix is simple, just set the Xpresso tag to priority Generators +1 so it will be executed after the generators (especially after the matrix). C4D will make sure, the spline gets executed after the tags which are assigned to it.
In your Xpresso I was first a bit confused, as it was throwing an error (the point node highlighted yellow). I expected it to do nothing at all, but surprisingly it did quite well… The reason is, the iteration node being fed the MoData count as end of iteration. With this it actually iterates one too far and thus the point node addresses a point not existent in the spline. Fix is simple, just subtract one before feeding into the iteration node.
Here’s the scene with changed priority and xpresso fixed: cgs_xpresso_lag_2.c4d (142.1 KB)