I don't know why you wouldn't just store actual vectors for each object. They aren't hard to obtain with the
move object command. You're going to have to convert your angles and momentum into standard vectors, add them together, and then extract angles out of the new vector. All of that seems a very unnecessarily complicated process.
First, to avoid having to get into lots of math, I'm going to assume you have an object to allow DBPro to help us. AngleX and AngleY are the two angles around the X and Y axis, and Magnitude is the "momentum".
We can convert the angles and magnitude into a standard vector like this:
a=make vector3(1)
position object 1,0,0,0
rotate object 1,AngleX#,AngleY#,0
move object 1,Magnitude#
set vector3 1,object position x(1),object position y(1),object position z(1)
Use that bit of code to convert the other set of angles too. Once we have vector 1 and 2 filled with the appropriate data, just use the vector addition commands SvenB pointed out.
Add them like this:
Or, if you want to keep the old vector, just make a new one beforehand.
After that, you should have your resultant vector, just the way you want it. If you
realllly want to return it to the form of AngleX,AngleY,Magnitude, you could do this:
position object 1,0,0,0
point object 1,x vector3(1),y vector3(1),z vector3(1)
AngleX#=object angle x(1)
AngleY#=object angle y(1)
Magnitude#=length vector3(1)
Edit: Oh, and I'm sure that most of the confusion generated by this thread is due to the fact that two angles and a magnitude is not an acceptable way to denote a "vector". Gimbal lock prevents each combination of angles from being unique.