Custom Behaviors/Reuseable Code Blocks

Discussion and feedback on Construct 2

Post » Thu Mar 14, 2013 1:24 am

Does C2 have a way to create behaviors like behaviors in Stencyl? In stencyl a behavior is just a collection of events that you can save and reuse across projects like the behaviors in C2. I know we can build custom plugins and behaviors with jdk but that is a little complicated and not the same as above. This would be a huge bonus if added or if it already exists. I love C2 way more then stencyl deleted itin fact he main problem it has is its stuff doesn't work itsnot reusable out of box.

Thanks

Brett
B
21
S
7
G
1
Posts: 128
Reputation: 3,076

Post » Thu Mar 14, 2013 5:49 am

@jbmoyer Never used Stencyl, but by the sound of it, could Functions be what you are looking for?

https://www.scirra.com/manual/149/function
B
58
S
28
G
7
Posts: 13
Reputation: 6,203

Post » Thu Mar 14, 2013 4:49 pm

Functions are close, but the real benefit of the behaviors in Stencyl is that they are exactly like the behaviors in C2. They are cross application, you update one codebase and "if you recompile" your app then it will get the updates. But the key difference between the two Stencyl and C2 is that in Stencyl you can create them on the fly and save.

For Example: Create Behavior, add a bunch of events (much like you functions), Save. then you just insert it into your apps.

Take C2 Functions and add a Save as Behavior option that would be great. Then you can Insert that Behavior into any app you build.

I apologize for mentioning Stencyl so much, it is a decent tool but I dropped it because the out of box examples were overly complex and were not reproducible, the out of box behaviors also didn't consistently work. As compared to C2, so far I have seen everything work as expected and am very impressed, the UI could use an improvement, but I am sure that will come with time.

Thanks
Brett
B
21
S
7
G
1
Posts: 128
Reputation: 3,076

Post » Thu Mar 14, 2013 7:24 pm

there are behaviors in SC2, buried somewhere in the left column
B
18
S
5
G
4
Posts: 568
Reputation: 5,079

Post » Thu Mar 14, 2013 7:41 pm

Correct, but those are either the out of box ones or one you create with the JDK. I can surely create what I am thinking with the JDK but its way overkill and not as flexible. Ok thanks maybe the next version :)

Thanks
Brett
B
21
S
7
G
1
Posts: 128
Reputation: 3,076

Post » Thu Mar 14, 2013 8:35 pm

Making yours is the only way for nowWhiteclaws2013-03-14 20:36:34
B
35
S
16
G
16
Posts: 2,222
Reputation: 16,589

Post » Fri Mar 15, 2013 12:33 am

I think it's a cool idea
B
20
S
5
G
8
Posts: 325
Reputation: 6,473

Post » Fri Mar 15, 2013 12:38 am

Oh ... I understood now :D
Kinda like re-usable functions ...

Well , I don't think it's possible because every object can have different behaviors ( Example : The events of the bullet behavior of an object with bullet behavior won't work on an object without a bullet behavior )
B
35
S
16
G
16
Posts: 2,222
Reputation: 16,589

Post » Fri Mar 15, 2013 1:40 am

Whiteclaws, yes, no huh?

Yes Re-usable Function is a good way to look at it, I like the idea of create a good solid Function and Do save as Behavior... anyhow

So I don't get why you don't think it works? The behaviors are exactly this, I am just looking for an easy way to create on the fly based on a list of events.

Think of it this way, you create a great double jump ability for a platformer and you are a platformer addict its all you build and you wanted to use that in all of your apps, right now you have to copy/paste, which would work, but what if you find a better way to do X in that or a bug, now you got to fix it in all your apps. One codebase vs N.

You could build a behavior, surely but man it would be nice to do on the fly. Anyhow. Thanks.

Brettjbmoyer2013-03-15 01:41:17
B
21
S
7
G
1
Posts: 128
Reputation: 3,076


Return to Construct 2 General

Who is online

Users browsing this forum: BBaller1337 and 14 guests