There is nothing wrong in applying a movment of (0,0,0). That said, if you still want to check it, first I would prupose to check the number you’ve generated e.j:
<i>n = random.randint(-1,1)
if n != 0: own.applyMovment([0,0,n])</i>
If that can’t be done becouse you create a Vector object, then just use it’s attributes (xyz) or (wxyz if 4D). So:
n = random.randint(-1,1)
vect = mathutils.Vector([0,0,n])
n = None #Ups!
if vect.z != 0: own.applyMovment(vect)
If not happy with that and you still want to check all two vectors are equal (in this case, equal to (0,0,0)), you can just do:
if (vect.x, vect.y, vect.z) == (0,0,0):
#The pharentesys is just my style, this is also valid:
if vect.x, vect.y, vect.z == 0, 0, 0:
#You can also try this
if vect == mathutils.Vector([0,0,0]): #
Now the last line may not work, since python will probably check the object references and not if the objects are equal. (The documentation however says it should work fine, but I’m not convinced). The documentation also sais that you can use:
<i>if vect.to_tuple() == (0,0,0):</i>
And it also says that you can use Swizzling, wich if I understood correctly (not really sure), shuld make this possible:
<i>if vect.xyz == (0,0,0):</i>
And last but not least, since you can acces the elements of a vector like if it were a sequence, this shuld also be possible:
<i>if vect[:] == [0,0,0]:</i>
Not even I knew there was so much ways to do it before you asked.
Also an important note if you’re going to use vectors in BGE. A mathutils.Vector has no owner, but an obj.localPosition vector has “obj” as it’s owner. It means that modifying the vector will also apply the changes on the position of the object, this can generate some unexpected behavior, so if that’s the case you can make a copy of such vector with obj.localPosition.copy().
Edit: If you’re really going into python, try BGECore, if you aren’t, you should still try it’s launcher.