model interactions ?

Posted By: gamers

model interactions ? - 09/19/14 20:00

Hi, I have 3 different models that 2 3d non-animated models and 1 animated 3d model, I want to interacting these 2 models. When the distance between of these two models smaller than 100 quants, I want to remove these two non animated models and show a brand new 3D animated model. Is there any way to do this ? Please give me example code... Thanks everyone...
Posted By: Superku

Re: model interactions ? - 09/20/14 04:22

Use at least one while loop, then for example entity pointers or WED names and ent_for_name() or certain entity skills(-values) and ent_next in a loop to remove the non-animated models. Then use ent_create to create the new animated entity.
Posted By: gamers

Re: model interactions ? - 09/20/14 10:01

Please give me an example code because I couldnt do this
Posted By: Superku

Re: model interactions ? - 09/20/14 10:28

No.
Try it yourself.
Posted By: Tele

Re: model interactions ? - 09/20/14 17:29

Lol, Cool
reply Superu :-)
Posted By: Wjbender

Re: model interactions ? - 09/21/14 09:16

to determine distance between two positions use

vec_dist

to remove entities use

ent_remove or ptr_remove

to create entities use

ent_create


to understand these functions use

the manual or do the lite-c walkthroughs and examples ,there is also aum magazines .

your code would be something along the lines of

//loop start
....
//if new entity not created yet then proceed
if (vec_dist (ent1.x,ent2.x) == 100);
{
//remove ent2 here
//create new animated entity here
//switch on a variable to make sure you create the //entity only once
}
......
wait (1);
//loop end
Posted By: gamers

Re: model interactions ? - 09/21/14 09:45

thanks wibender wink
Posted By: Wjbender

Re: model interactions ? - 09/21/14 14:21

oh and use (smaller than or equal) instead of (equal)

<= 100 instead of ==100
© 2024 lite-C Forums