vec_for_screen / vec_to_screen

Posted By: alpha_strike

vec_for_screen / vec_to_screen - 12/15/09 15:26

Sorry, I feel like a bloody beginner, think I have a total black out
...

vector temp;
temp.x=500; temp.y=500; temp.z=500;
vec_for_screen(temp,camera);

This codes result is an error 1515 (or 1513)
invalid arguments...

what the hell is wrong
Posted By: Ottawa

Re: vec_for_screen / vec_to_screen - 12/15/09 15:51

Hi!

the vector temp is empty.
try putting a value of zero
VECTOR temp = {x=0; y=0;z=0;}


Posted By: Bunsen

Re: vec_for_screen / vec_to_screen - 12/15/09 16:03

'vector' is not a data type but a function (or macro):

Try:

VECTOR temp;
...

or

vec_for_screen(vector(500,500,500), camera);
Posted By: Superku

Re: vec_for_screen / vec_to_screen - 12/15/09 16:05

VECTOR has to be in capitals (nur um sicherzugehen, falls du das nicht eh schon hast).

Edit: too slow...
Posted By: alpha_strike

PROBLEM vec_for_screen - 12/15/09 21:51

Sorry fellows, I am going crazy. Totally blacked out.
Some bros, please have a look...
This is some code. I just want to try out vec_for_screen.
I load a level, with existing camera... and always get a crash.
What is wrong with this lines???!?!?!
E1515 invalid arguments in start_the_menu


VECTOR* testvec = {x=500; y=500;z=500;}
function start_the_menu()
{
level_load("leer_lev.wmb");

vec_set(camera,vector(0,0,0));
camera.pan=100;
camera.tilt=5;

wait(2);


vec_for_screen(testvec,camera);

}




Posted By: flits

Re: PROBLEM vec_for_screen - 12/15/09 22:14


vec_set(camera.x,vector(0,0,0));

dont forget the .x ?
Posted By: Machera

Re: PROBLEM vec_for_screen - 12/15/09 22:32

maybe testvec values are not invalid on this contdition. try another values.
Posted By: alpha_strike

Re: PROBLEM vec_for_screen - 12/15/09 22:38

bro, let me tell you some shit.
I swear to god, that I use vec_for_screen nearly since 2002, my first game war train. Uncountable times.
O.k., since I changed from C to Lite, there are several problems. But I solved them...
This day I was near fictional suicide... I checked out hundreds of combinations and always thought that I still not clearly understand the new usage of vectors.
BUT THAT I MADE THIS MISTAKE vec_set...
bro - god bless you - thank you - this day comes to a good end.
edit.Thank and hail to all bros who take the time and read my shit.
Posted By: Quad

Re: PROBLEM vec_for_screen - 12/15/09 22:45

tip: in lite-c if you pass a varible or one component of vec instead of a complete vector(i.e camera.x,my.x, my.skill30) variables following this variable are considered as y and z values of that vector you meant.

i.e if you use camera.x lite-c gets the camrea.y and z automatically.

if you use skills it will use following skills as vector's component.
i.e:

VECTOR temp_vec;
temp_vec.x = 10;
temp_vec.y = 12;
temp_vec.z = 35;
vec_set(my.skill45,temp_vec);
//lines above will make your skill45 10, skill46 12 and skill47 35.

---

in same way this sometimes result in diffrent sutiations.
like panels only have pos_x and pos_y, there is no z pos.

if you call vec_set(panel1.pos_x,panel2.pos_x);
it will set pos_x and pos_y correctly, but it will also make panel1's flags same as panel2. Because in PANEL struct var pos_x and var pos_y is followed by long flags. Thus vec_set gets it as third(z) component of vector and also sets it.
Posted By: flits

Re: PROBLEM vec_for_screen - 12/16/09 07:48

np its great that i am not the only one who is pulling out his here's some days
© 2024 lite-C Forums