Create a spark at precise collision point?

Get help using Construct 2

» Mon May 30, 2016 4:39 pm

Yes. R0J0hound's examples had a TileMap mechanism.
B
71
S
22
G
288
Posts: 3,859
Reputation: 158,424

» Mon May 30, 2016 5:07 pm

blackhornet wrote:granpa's code (almost) does it (brackets were in the wrong place):

x=(square1.x+square2.x)/2
y=(square1.y+square2.y)/2

oops.....I wrote that at 7 am my time on memorial day morning with one eye shut......
What I know would fill a Book , what I don't know would fill a Library
B
37
S
12
G
29
Posts: 331
Reputation: 16,499

» Mon May 30, 2016 5:49 pm

Zebbi wrote:
newt wrote:The simplest method would be to use dummy detector objects.

Yeah, thats what I'm thinking. Does pinning 4 detectors cause a big increase in resources?

Not unless you have a large amount of instances that need the dummies.

The most efficient method would be to make separate objects for the detectors, and put them in a container with the object.
Make as many image points as you need and label them sequentially, d0, d1,d2....
Then on creation make a loop and place them at imagepoint "d"&loopindex.
B
178
S
50
G
206
Posts: 8,684
Reputation: 127,711

» Mon May 30, 2016 9:52 pm

blackhornet wrote:Yes. R0J0hound's examples had a TileMap mechanism.

Trying this:https://www.scirra.com/forum/get-the-x-and-y-of-a-span-class-posthilit-collision-span-span-class_p1025697?#p1025697 adjusting the code to match my car, at the moment it's not resizing the masking box to the size of my car properly, and it's occurring on impact of the tile regardless of the tiles collision polygon, am I missing something?
B
41
S
12
G
14
Posts: 1,124
Reputation: 11,286

» Tue May 31, 2016 1:17 pm

Done, I created and pinned each detector sequentially in a big 16 piece event, pretty ugly but I'm not smart enough to do it with an efficient, dynamic loop :/
B
41
S
12
G
14
Posts: 1,124
Reputation: 11,286

Previous