Hello. First I'd like to say that I'm very impressed with this IDE and the community around it. So much so that it's inspired me to try and go deeper than the surface and understand the plugin system, with hopes of contributing positively to this community.
Sorry for the long post, but I'm unsure if I could explain what I'm trying to accomplish with less words.
This may sound odd, and please excuse me I am very new to all of this, but I was thinking about how I would like to interact/control some things in C2, and even develop a plugin or two. What I found myself planning for some of the plugins wasn't a "new" way of doing something, but more of a way to use what already exists. I'll try to explain.
I found it odd that I did not have full control over gravity for each object. I know gravity is a universal thing in the real world, but why can't I turn it off for one object if I want. Like, lets say I want a hovering ball that is also a physics object.
From what I found, I can't. So I came up with two options:
1. Try to counteract the gravity by an equally opposite impulse
2. Remove gravity all together and implement my own.
Obviously modifying one object is easier than all objects, so I tried the first option. Unfortunately I found it hard to get it "exact" so the ball kept moving just a little.
Option 2 seemed a better fit, so I proceeded to turn off all gravity and implement my own values for gravity (by using downward force) and just do it for each object I cared to have gravity "on". This provided exactly what I wanted, but having to add events in each time are tedious/annoying. I mean, I'm adding the same thing each time. Which I also had an issue with for the ball moving slowly, but fixed it by adding an event that turned "immovable" on, although it was already on, a quirk I am ok with.
I'm not a programmer or developer, though I have done a bit of both in my own "spare" time. I have extensively used a different game IDE, and although there is a lot of reasons I choose not to use it (biggest reason is the browser plugin requirement to play games in a browser), it did have one feature I am missing here. The ability to write a "script" and apply that to whatever object I choose.
The "behavior" system in C2 seems to have a similar ability, though it is quite a bit beyond my level of programming knowledge, I appreciate the challenge.
What I'm getting to is that in the "other" system I could access other scripts through one script. So if I wanted to modify a global variable, I could. Or if I wanted to apply a force to another object I could. And on and on.
What I've been looking for with C2 is a way to do something similar. What I've found so far, if I understand correctly, is that implementing a "scripting" option for the Event system is not possible because of the need to be cross compatible with any exporter that may be developed.
I have a question here. It seems to me that what people are looking for in a scripting system is a way to "write" what it is they are already doing in a more visual manner. So instead of a visual block that looks like an event, they would write:
event Gravity(){objectName.Impulse(forcePower, angle, imagePoint);}
or something similar. I understand this changes the way this IDE is meant to operate, and sounds to me like a considerable change for the developers, so...
This led me to want to attempt something similar on my own through the plugin system. I've spent a few days going over the SDK documentation, and reading over the comments in various plugins/behaviors. And although I don't completely understand all of it, I feel confident that I could figure it out and accomplish something. Problem is, I'm not sure what I want to do is even possible.
A couple examples:
1. A particle system.
Nothing crazy here, and nothing that I couldn't do through the event system, but if it was a plugin/behavior it would be way more usable, and others could also benefit.
All I need is to spawn X number of the same object in a definable area (x, y), apply some direction to these objects, and various other things like rotation, time to fad out, randomness, etc.
Everything I need for a particle system is already a part of C2, or in various plugins that come with the main package.
So to write a new plugin that already does what is available seems kind of dumb to me. Which leads me to my question: Can a plugin access other plugins?
2. Custom Gravity
Already explained above for why I would want to do this. The behavior would allow for access to the variables that dictate gravity and direction of gravity on a per object basis. Seems to me that I'd need two parts to this. One that set the variables on a global level, to be applied to an invisible object in the layout, and one that would be applied to the objects you wanted affected and took those variables. So the "creator" object type would be available to the "implementer" object type through a drop down list. Multiple of each would be possible for any object. Again, this is just accessing/passing info already available through the IDE and/or the physics plugin.
3. Scripting
All of these thoughts led me to think that I could do all of these things through a scripting method, if I only had that option. So why not try to build a plugin that allowed a way to do this through a weak scripting language that I could design? Several possible options on how this would work, but I could not find any way to access other, already present, actions in C2. As well as a way to have a "popup" so that you could input a larger amount of text than would be available in the little side bar text field.
Anyways... I'm pretty sure that if you made it through all that you get what I would like to accomplish. Before I spent more time looking for answers that may not exist, I thought I'd give it a shot on the forums.
Again, sorry for the long post. Thank you for taking the time to help me find some answers.
-Cym