Game Development Community

New item position question

by Kevin Yu · in General Discussion · 12/04/2006 (1:25 am) · 2 replies

Greetings,

I want to know when I use 'new item' function,how can I use variables instead of constants to assign "Position".

I have tried something like "position=%obj.getPosition();" instead of "position="123 456 789";" and it works.But I want to specify x,y,z coords of the new item,like "position="%x %y %z";"(I know its wrong).

Any ideas?

Thank you...


Kevin.Y

#1
12/04/2006 (7:41 am)
Try this:

position=%x @ " " @ %y @ " " @ %z;
#2
12/04/2006 (8:20 am)
Position= %x SPC %y SPC %z;

This will save you a tiny amount of typing, although the above code works fine.