Scirra / Construct-feature-requests

A place to submit feature requests and suggestions for Construct.
https://www.construct.net
9 stars 1 forks source link

Event Sheet based Behaviors #295

Open TackerTacker opened 1 month ago

TackerTacker commented 1 month ago

Reviewed guidelines

Checked for duplicate suggestions

Summary

Behaviors are a foundational building block of making any game in Construct, but we have no way of creating our own with event sheets.

I want to be able to write event sheet code that can be attached to Plugins like a Behavior.

Possible workarounds or alternatives

Developing your own Behavior as an addon, which is IMO out of reach for many Construct developer.

Proposed solution

I think a great way of implementing this from a UX standpoint would be if we could add an event sheet to Plugins as a Behavior. You would attach the Event Sheet Behavior to a Plugin and it would have 2 properties, an enable/disable boolean to enable or disable the behavior, and a drop down where you can select one of the available event sheets in the project.

There would be a new global ACE similar to System but with the name Behavior which is accessible everywhere but only does anything if that event sheet is attached to a Plugin as Behavior, as well as Behavior Variables which are similar to Global Variables but their scope is limited to the event sheet they are on and if the event sheet is attached as a Behavior those Behavior Variables show up as properties ( This way the code is portable because Behavior and Behavior Variables never becomes invalid ).

grafik grafik

The new global ACE would add things like: CONDITIONS

ACTIONS

EXPRESSIONS

grafik grafik

Why is this idea important?

Because it would make Construct 1000 times more powerful and cooler 😎

Being able to create your own Behaviors with Events would allow us to write composition based code which is a lot more flexible. Basically any reason why Behaviors are great in Construct can be transferred 1:1 to why event based Behaviors would be great.

Additional remarks

I know this would be a year long development, but I also know this isn't a new idea to Scirra, Ashley talked about this a long time ago already. By making this an official feature request I hope to increase the chances for this to be considered again, I also hope that this will lead to a discussion in the comments on what people would want from this feature, what they would expect, flaws with my suggestion, anything that's unclear, and how they think things should be implemented, maybe my implementation idea isn't the best. I also suggested only a few ACE's, so I'm curious about your ideas, what are some Actions/Conditions/Expressions you think would be important?

WilsonPercival commented 1 month ago

You can now use scripting to write your own behaviors. If you don't want to learn JS, you're missing out. It's no more difficult than learning how the event editor works. I'm sad that you don't use such a powerful tool as scripts.

TackerTacker commented 1 month ago

Please stay on topic, your coding preferences isn't a valid argument against other peoples preferences. The logical conclusion to your argument is that we should get rid of Event Sheets in Construct because JS is more performant.