Detecting enemies in elipse

Get help using Construct 2

Post » Wed May 15, 2013 5:09 pm

Yeah @Magistross I remember that well since it works fine for my woodcutter to find the nearest tree. In that case I needed it now and then when the last cutting tree gets exhausted.
In this case tho, I need an event ran every tick. I imagine making calculations about every unit in the field every second gets too much.
B
12
S
3
G
1
Posts: 120
Reputation: 1,829

Post » Wed May 15, 2013 5:49 pm

Can't be worse than checking for collision for every unit every tick though !

In fact, if you use only a "sum of deltas" approach instead of checking for the exact distance, I think it would be much LESS expensive than collision checking. Wouldn't hurt to try !
B
46
S
17
G
18
Posts: 847
Reputation: 13,802

Post » Thu May 16, 2013 7:10 pm

I see
I'm new to all that scripting/coding stuff so excuse my ignorance :)
So you are saying @Magistross that using collisions for detection also runs check every tick for all units? Not good.
I'll try your approach and will run some stress tests.
Thanks
B
12
S
3
G
1
Posts: 120
Reputation: 1,829

Previous

Return to How do I....?

Who is online

Users browsing this forum: fredriksthlm, marekmk and 3 guests