I still can't figure out this...

Discussion and feedback on Construct 2

Post » Wed Jul 15, 2015 11:11 am

@Colludium Exactly. That is the one I used in my example. But can't fix it where I am atm.

But pick overlapping point
- stone.x
- stone.y

And with the correct conditions is should work :)
B
54
S
23
G
12
Posts: 747
Reputation: 11,910

Post » Wed Jul 15, 2015 11:45 am

So if I'm not missing the point, I guess the easiest way would be something like:

Overlapping (Image) point
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed Jul 15, 2015 11:49 am

Pick by overlapping point? System condition?
Follow my progress on Twitter
or in this thread Archer Devlog
B
38
S
15
G
17
Posts: 949
Reputation: 12,320

Post » Wed Jul 15, 2015 11:54 am

@tunepunk Yeah it's a system expression

@Littlestain That seems to work fine! Had the same thing going on but messed up the conditions :)
B
54
S
23
G
12
Posts: 747
Reputation: 11,910

Post » Wed Jul 15, 2015 12:04 pm

My only reservation about using it is I have no idea whether or not it uses collision cells. No biggie for a single check per tick, I guess, but on mobile devices...

@Anonnymitet - I am using my phone and didn't realize you'd already got there! :)
A big fan of JavaScript.
B
74
S
20
G
69
Posts: 2,207
Reputation: 43,836

Post » Wed Jul 15, 2015 12:21 pm

Colludium wrote:My only reservation about using it is I have no idea whether or not it uses collision cells. No biggie for a single check per tick, I guess, but on mobile devices...

@Anonnymitet - I am using my phone and didn't realize you'd already got there! :)


Maybe I'm thinking in a very simple way, but if it doesn't use collision cells wouldn't adding an is overlapping condition before the system pick event solve that?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed Jul 15, 2015 12:28 pm

@LittleStain - I'd have to run some tests to be sure but that sounds like the best way of doing it.
A big fan of JavaScript.
B
74
S
20
G
69
Posts: 2,207
Reputation: 43,836

Post » Wed Jul 15, 2015 12:31 pm

Ashley wrote:
Danwood wrote:It does, i tried. I got hundreds objects, even if i check every 10 seconds, the lag caused by the evet is there. Because i need to put For Each object -> create test sprite -> test sprite overlaps/dont overlap. Basically, it has to repeat the event for every object.

(Emphasis added)
Creating a sprite is a far more performance intensive than checking for an overlap! Instead you should just have one instance of a 1x1 sprite which you simply position to the image point, then test for overlap with. If you are just moving around one instance of the "detector" sprite and not constantly creating and destroying them, it should be perfectly performant.


Awesome! I'm gonna try this ;)
B
65
S
22
G
4
Posts: 358
Reputation: 6,555

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: Exabot [Bot], lukewasthefish and 7 guests