picking closest object

For questions about using Classic.

Post » Mon Apr 21, 2008 6:13 pm

[quote="Ashley":1o44mrdz]
You'd also have to track the targetted object being destroyed, other objects coming closer, etc. etc. I'll give you the events if you want, but I'd recommend the Turret behavior for now.[/quote:1o44mrdz]

That's alright I don't need anything that advanced, and the turret behavior doesn't quite do what I want, but I've managed to solve the problem using a for each condition and storing the target location in private variables. (turns out I used the for each condition wrong the first time I tried :oops: )


[quote="Ashley":1o44mrdz]It's worth noting the spread value/fastloop pattern is redundant in Construct - always use a For Each instead.[/quote:1o44mrdz]

Good, cause I have no idea what a spread value is :) I've seen people talk about in some other posts on this forum when talking about mmf, but I had never heard of mmf before I read that post so I don't know much about it.
B
3
G
4
Posts: 28
Reputation: 1,133

Post » Mon Apr 21, 2008 7:08 pm

Never heard of mmf?? Wow.. i thought everyone here was X-mmf-users.
B
8
S
2
G
5
Posts: 744
Reputation: 3,288

Post » Mon Apr 21, 2008 7:12 pm

BTW since it's been a request a few times, the next build has an updated Turret movement which can target objects with a nearest-always method (which means if something else comes closer, it'll target that instead) - so it will be able to be used for finding closest objects too.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Mon Apr 21, 2008 10:13 pm

[quote="Ashley":3hoxrgav]BTW since it's been a request a few times, the next build has an updated Turret movement which can target objects with a nearest-always method (which means if something else comes closer, it'll target that instead) - so it will be able to be used for finding closest objects too.[/quote:3hoxrgav]

Yeah that could be really handy. And if you find time to do it please add destructible terrain :D I feel the need to kill dirt! :twisted:



[quote="Attan":3hoxrgav]Never heard of mmf?? Wow.. i thought everyone here was X-mmf-users.[/quote:3hoxrgav]

I knew a little python before I started looking for game creation software, so I googled something like "game making software python" and somehow ended up on scirra.com and I started using construct, so I guess lucky googling kept me from mmf. (good thing cause I really prefer open source) :)

Anyways, I guess this is going off topic, and the problem I had is solved, so I'm just gonna.....uh......where is the "mark thread as solved" button?
B
3
G
4
Posts: 28
Reputation: 1,133

Previous

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 6 guests