C
Coppens
Guest
Hello,
(sorry for my bad English, I'm Belgian)
I select an instance, it follows a path, at the end of it I modify a variable of this instance.
The problem is that if I select another instance of the object while the first continues its path, when the path is finished, the variable of the second instance is changed.
I'm looking for 6 weeks!
If I select another instance of the object, it should be the object selected from the beginning that changes when the path is completed.
thank you in advance for your help.
This is the code of creation:
global.arrCar = array_create(5);
global.arrCar[0] = instance_create_depth(639,286,1,objCar);
global.arrCar[1] = instance_create_depth(639,159,1,objCar);
global.arrCar[2] = instance_create_depth(703,159,1,objCar);
global.arrCar[3] = instance_create_depth(767,159,1,objCar);
global.arrCar[4] = instance_create_depth(831,159,1,objCar);
global.arrCar[5] = instance_create_depth(831,286,1,objCar);
when I select a objCar:
global.idCar = instance_nearest(x,y,objCar);
Remy
(sorry for my bad English, I'm Belgian)
I select an instance, it follows a path, at the end of it I modify a variable of this instance.
The problem is that if I select another instance of the object while the first continues its path, when the path is finished, the variable of the second instance is changed.
I'm looking for 6 weeks!
If I select another instance of the object, it should be the object selected from the beginning that changes when the path is completed.
thank you in advance for your help.
This is the code of creation:
global.arrCar = array_create(5);
global.arrCar[0] = instance_create_depth(639,286,1,objCar);
global.arrCar[1] = instance_create_depth(639,159,1,objCar);
global.arrCar[2] = instance_create_depth(703,159,1,objCar);
global.arrCar[3] = instance_create_depth(767,159,1,objCar);
global.arrCar[4] = instance_create_depth(831,159,1,objCar);
global.arrCar[5] = instance_create_depth(831,286,1,objCar);
when I select a objCar:
global.idCar = instance_nearest(x,y,objCar);
Remy