Page 2 of 2

Re: collide.MY new problem.

PostPosted: Sat Mar 28, 2009 10:36 pm
by equinox
There is 2 Actor--> HERO.0 - HERO.1
ATTORE[0] = create HERO.O
ATTORE[1] = create HERO.1

there is 1 Actor ENEMY.0
ENEMY script-->collide any actor:

if(strcmp(collide.name,ATTORE[0].name) == 0)<--- error !!

if(strcmp(collide.name,ATTORE[0]->name) == 0){<---work...but collide with any ATTORE[0] and ATTORE[1], but i want it to collide only with ATTORE[0]<--(HERO.O) and not collide with HERO.1...n

Re: collide.MY new problem.

PostPosted: Sat Mar 28, 2009 10:41 pm
by skydereign
Okay, that is what you want. It is doing exactly as you are telling it as both have the same name. Change name to clonename, because they have different clonenames this will work.
Code: Select all
if(strcmp(collide.clonename,ATTORE[0]->clonename) == 0){

Clonename uses the cloneindex and the name.

Re: collide.MY new problem.(RESOLVED)

PostPosted: Sun Mar 29, 2009 10:43 am
by equinox
Perfect !!!!

Tnk1000 for the nuovo help me.

In the meantime, I tried this solution:

if(strcmp(collide.name,"EROE_1") == 0){
if(collide.cloneindex == 0 && ContITEM < MAXITEM){...but

...if(strcmp(collide.clonename,ATTORE[0]->clonename) == 0){<--- i prefer this. :o)