source code for the plugins (specially Pairer)

Forum for plugin, effect and behavior programmers. Please use the Help & Support forum for help using Construct.

Post » Wed Jun 22, 2011 12:37 am

Hi all!,

I'm still somewhat stuck in my journey on to make a construct plugin.

They plugin I want to make will be used to group any bodies (rigorously of the same type) that are interacting and make a single group out of them, so they could move together and so on...

After researching the currently plugins available, I think ObjectPairer comes closer on the kind of functionality I want to produce. There is also the Array plugin, which, I (Hope) I could learn how to get the properties of the other bodies using the SDK. But none of them has their source code available in the construct-source zip file.

Stripping my problem of all the details, I need a way to, using the SDK, get all the bodies of the same type that are interacting and make an array out of them, so I could update all their positions color, etc at the same time.

Could you guys please direct me? Or help me reach dave or the author of the Array plugin?

Thanks you very much and sorry for the bother.

Draco
B
1
G
1
Posts: 9
Reputation: 443

Post » Wed Jun 22, 2011 2:43 am

Just curious, is there a specific formation you wish to use?
Image Image
B
161
S
48
G
89
Posts: 7,347
Reputation: 66,249

Post » Wed Jun 22, 2011 11:32 am

Hi!
about the formation, I want to create huge terrain and ice blocks.

For example, whenever the player destroys the terrain/ice cube, the one's falling will snap to the others in rest and their images will change in result, as to always look like a huge terrain/iceberg block. These blocks can be moved, but only as a 'single' entity.

tks!
B
1
G
1
Posts: 9
Reputation: 443

Post » Wed Jun 22, 2011 1:47 pm

That doesn't sound too bad to replicate in events even without those plugs.
The snapping together would be the easy part, but moving as a single object would be a bit involved, especially if you want to preserve angle.
If you can set that up in events, there's a good chance the devs could point you in the right direction as to how to do it in a plug.
For example Lucids "S" plug has an expression to help make on the fly image points.
Image Image
B
161
S
48
G
89
Posts: 7,347
Reputation: 66,249

Post » Wed Jun 22, 2011 2:13 pm

the problem I'm facing using the events is that I can't get the other body properties properly when the collision involves objects of the same type. I can't tell which one is body A or body B in the collision, therefore I wanted to make the plugin. This happens at least in my construct's version (0.9.x).

So I've tried lots of things using the events, but failed. Like trying to use families to distinguish every body in the collision and so on. If i could get the position of all objects of the same type that are on stage, that would be pretty easy.
B
1
G
1
Posts: 9
Reputation: 443

Post » Wed Jun 22, 2011 2:20 pm

You could try all of the same object with different frames.
Image Image
B
161
S
48
G
89
Posts: 7,347
Reputation: 66,249

Post » Wed Jun 22, 2011 2:40 pm

what about using the Array and/or HashTable plugins?
B
1
G
1
Posts: 9
Reputation: 443

Post » Wed Jun 22, 2011 2:46 pm

I don't see the point, each instance can hold several variables.
Then use a for each object.
Image Image
B
161
S
48
G
89
Posts: 7,347
Reputation: 66,249

Post » Wed Jun 22, 2011 4:18 pm

If I could create an array of sprite Objects (not sprite objects carrying an array), I think I could check the state of all of them the way I wanna do...

any thoughts?
B
1
G
1
Posts: 9
Reputation: 443

Post » Wed Jun 22, 2011 6:36 pm

U can create an array of objects with the s plugin
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Next

Return to Construct engineering

Who is online

Users browsing this forum: No registered users and 0 guests