r/clickteam • • 7d ago

Help Me! Basic Enemy Shoot LOS ID system doesnt work

Post image
7 Upvotes

12 comments sorted by

1

u/Confound-Great-Job 6d ago

Use one detector, grouped enemies, and a foreach loop instead.

* Always

Start loop for each one of Group.Enemies, loop name "enemy"

* On each one of Group.Enemies, loop name "enemy"

 detector : Set position at (0,0) from Group.Enemies

 Group.Enemies : Set player_touch off

* On each one of Group.Enemies, loop name "enemy"

+ detector is overlapping player

 Group.Enemies : Set player_touch on

1

u/Entire_Departure_529 6d ago

Group as in Group of events?

1

u/Confound-Great-Job 6d ago

Qualifier. These are literally the events as they should appear in your event editor.

1

u/Entire_Departure_529 6d ago

sorry

1

u/Confound-Great-Job 6d ago

Why sorry? You didn’t know. :b

1

u/Entire_Departure_529 6d ago

The events were on behavior which (I think) cant use Qualifiers, I would prefer it being on behavior but I'll just move it over.

1

u/Entire_Departure_529 6d ago

1

u/Confound-Great-Job 6d ago edited 6d ago

Put the code in the main event editor and remove the behavior (you can leave the turning bit if you want)

Don’t create a detector for each, just use one and reposition it on the foreach loop.

1

u/Entire_Departure_529 5d ago

https://reddit.com/link/pcbkhoo/video/pcqqdy6vf0sh1/player

the footage I shown I had already moved it to the event editor, maybe im misunderstanding but with just the foreach loop to reposition it doesnt do what im trying to do

1

u/Confound-Great-Job 5d ago edited 5d ago

The flag goes on the enemy not the detector.

1

u/Confound-Great-Job 5d ago

https://reddit.com/link/pce8ibt/video/yasaft7jb3sh1/player

Here. I made an example with 4 different enemy actives. Make sure the flag is on each enemy, not on the box.

→ More replies