Expression 2 Question (Tracking People)

I’m a C/CPP coder so I’m not going to ask for someone to give me all the code so I can copy/paste it into my expression. That’s stupidly easy and doesn’t present any sort of challenge.

I know minimal E2, all of my current knowledge comes from other languages. With a little help from a friend, I’ve made an anti-minge for a server I play on where the admins aren’t that active. On command, it will set its mass to 50,000 and slam into someone.

The only problem is that a lot of the time it takes out more than the minge. I’d like to make it able to track everyone in its immediate area (if not possible, just everyone on the map. Provided it wouldn’t get laggy) and make sure it doesn’t collide with people that are not the target.

Just give me a nudge in the right direction, and I’ll be very grateful.

If you create a ranger facing in the direction it’s moving (Var = rangerOffset(Distance,entity():pos(),entity():vel():normalized()))
you could check for Var:hit(), and if hit then stop moving, or move up 200 units. 200 units should be enough to avoid hitting them in an open area.