Hello im new in Pol and im a little confused. I tried to move a sign ob the Z axis but none oft the commands would work. Could someone explain me, why it doesnt work or is it just not implented Oo'
Greetings !
Moving objects on the Z axis
Well, if you are using mpz the syntax is as follows:
mpz <amount_to_move> where amount_to_move is an integer. If amount_to_move is positive the item will move up (positive Z movement) the amount specified. If it is a negative integer the item will move down the specified amount.
Is that the command you used? If so did you specify an amount?
You can also use iteminfo and change the Z parameter in the gump but mpz is quicker.
mpz <amount_to_move> where amount_to_move is an integer. If amount_to_move is positive the item will move up (positive Z movement) the amount specified. If it is a negative integer the item will move down the specified amount.
Is that the command you used? If so did you specify an amount?
You can also use iteminfo and change the Z parameter in the gump but mpz is quicker.
Hello again,
the problem isnt solved yet.
My testing object is a brass sign and im using the pol 097...
I tried what both of you said but all that won't work.
The command will work fine with the x and y axis but the z axis still won't change. If i add the MOVEOBJECT_FORCELOCATION nothing will work.
Am i doing somethin completly wrong?
[/code]
the problem isnt solved yet.
My testing object is a brass sign and im using the pol 097...
I tried what both of you said but all that won't work.
Code: Select all
use uo;
program textcmd_movez(who)
var what := Target(who, TGTOPT_NOCHECK_LOS);
if (!what)
return;
endif
var values:= Splitwords(RequestInput(who, who.backpack , "How much do you want to Change the coords?" ));
MoveObjectToLocation(what, what.x + CInt(values[1]) , what.y + CInt(values[2]) , what.z + CInt(values[3]) );
endprogram
Am i doing somethin completly wrong?
[/code]
Are you placing the forcelocation in the realm spot?
This should work
MoveObjectToLocation(what, what.x + CInt(values[1]), what.y + CInt(values[2]), what.z + CInt(values[3]), what.realm, MOVEOBJECT_FORCELOCATION);
notice the what.realm must be between the z and the forcelocation. Theres another way you can do it without the realm parameter which I'll list below. I do it the way I listed above mostly for completeness since I personally don't like seeing parameters just being skipped.
MoveObjectToLocation(what, what.x + CInt(values[1]), what.y + CInt(values[2]), what.z + CInt(values[3]), flags := MOVEOBJECT_FORCELOCATION);
This should work
MoveObjectToLocation(what, what.x + CInt(values[1]), what.y + CInt(values[2]), what.z + CInt(values[3]), what.realm, MOVEOBJECT_FORCELOCATION);
notice the what.realm must be between the z and the forcelocation. Theres another way you can do it without the realm parameter which I'll list below. I do it the way I listed above mostly for completeness since I personally don't like seeing parameters just being skipped.
MoveObjectToLocation(what, what.x + CInt(values[1]), what.y + CInt(values[2]), what.z + CInt(values[3]), flags := MOVEOBJECT_FORCELOCATION);