Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 863 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
model interactions ? #445674
09/19/14 20:00
09/19/14 20:00
Joined: Jan 2012
Posts: 108
G
gamers Offline OP
Member
gamers  Offline OP
Member
G

Joined: Jan 2012
Posts: 108
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...

Re: model interactions ? [Re: gamers] #445675
09/20/14 04:22
09/20/14 04:22
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
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.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: model interactions ? [Re: Superku] #445683
09/20/14 10:01
09/20/14 10:01
Joined: Jan 2012
Posts: 108
G
gamers Offline OP
Member
gamers  Offline OP
Member
G

Joined: Jan 2012
Posts: 108
Please give me an example code because I couldnt do this

Re: model interactions ? [Re: gamers] #445684
09/20/14 10:28
09/20/14 10:28
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
No.
Try it yourself.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: model interactions ? [Re: Superku] #445700
09/20/14 17:29
09/20/14 17:29
Joined: Mar 2005
Posts: 68
Baesweiler
Tele Offline
Junior Member
Tele  Offline
Junior Member

Joined: Mar 2005
Posts: 68
Baesweiler
Lol, Cool
reply Superu :-)

Re: model interactions ? [Re: Tele] #445710
09/21/14 09:16
09/21/14 09:16
Joined: Mar 2012
Posts: 927
cyberspace
W
Wjbender Offline
User
Wjbender  Offline
User
W

Joined: Mar 2012
Posts: 927
cyberspace
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

Last edited by Wjbender; 09/21/14 09:23.

Compulsive compiler
Re: model interactions ? [Re: Wjbender] #445711
09/21/14 09:45
09/21/14 09:45
Joined: Jan 2012
Posts: 108
G
gamers Offline OP
Member
gamers  Offline OP
Member
G

Joined: Jan 2012
Posts: 108
thanks wibender wink

Re: model interactions ? [Re: gamers] #445714
09/21/14 14:21
09/21/14 14:21
Joined: Mar 2012
Posts: 927
cyberspace
W
Wjbender Offline
User
Wjbender  Offline
User
W

Joined: Mar 2012
Posts: 927
cyberspace
oh and use (smaller than or equal) instead of (equal)

<= 100 instead of ==100

Last edited by Wjbender; 09/21/14 14:22.

Compulsive compiler

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1