Posted By
|
Message
|
 LordHannu Crazy?
Registered 22/04/2007
Points 7936
       
|
4th January, 2021 at 04/01/2021 22:00:08 -
I have 100 moving objects, one of them gets a string "tag" when clicked. When the tag one collides with a another one that doesnt have "tag" gets "tag" as string. How do I do it? Is it possible?
Thanks
n/a
|
 LordHannu Crazy?
Registered 22/04/2007
Points 7936
       
|
5th January, 2021 at 05/01/2021 20:03:48 -
I solved it.
When collide the string is diffrent than "tag" set "tag".
n/a
|
 The_Antisony At least I'm not Circy
Registered 01/07/2002
Points 1341
 
|
13th May, 2021 at 13/05/2021 20:23:56 -
The problem you're running into here - if you create 20 of the same active in a single play field, create a second active, test for collision, and set an alterable value or string, every single one of those 20 actives will mirror that value/string change upon a collision.
There's actually a much easier way to achieve this. Instead of setting an alterable string, just test for collision and set a flag to ON. Testing for activated flags will only select the specific actives that have collided with your player. Using a string - and having to test that the string matches 'tag' is far more resource intensive.
ChrisD> Employer: Say, wanna see a magic trick?
ChrisD> Employee: Uhh… sure, boss.
ChrisD> Employer: Your job! It just disappeared! Pack your things and leave! Pretty good trick, huh?
|
|
|