cymrix's Forum Posts

  • This is exactly what I was looking for, thank you. I never thought of using velocity like that. Totally makes sense.

  • Yann, Thank you. This is exactly what I needed. Very elegant solution.

  • cymrix: That bug maybe ?

    Yes. This does seem to be the thing that is happening... I was hoping it was something I was doing wrong, cause then I could fix it. Now I'm just a sad panda :(

  • anyone else running into weird control issues? For some reason a key seems to get "stuck", at first I thought it was just me, but I saw another post about it on the zombie game that is in the rotary arcade.

  • I might be wrong, but from all my tests, it seems if you put a string variable between quotation marks it doesn't work. Which might be by design, but I've not seen it this way with anything else that accepts strings (setting text in a text box, etc).

    I do not have a capx to load right now (out the door for christmas eve), but can later if it seems i'm the only one having the problem.

    -cym

    edited post say variable, sry about that, was rushing out the door. using a specific name works fine, it's only if you use a string variable, like "layoutName" vs layoutName.

    "layoutName" - doesn't do anything that I can tell, and doesn't go to any layout.

    layoutName - reloads the current layout

  • Understandable :), there is a lot of text/gibberish, sorry about that.

    I don't think you missed it at all, I appreciate the links. I'll check them out.

    I think I have it mostly figured out, at least for what I wanted to do in the beginning. Seems to make a lot more sense after I dig in and understand how C2 will let me do things vs how I want to do them :D Same end result for the most part I think. I'll adapt :) or die trying ;)

    Thanks again :)

  • :) I had been on this track while I was away from the forums. Thank you for the insight, it's good to know I was heading in the right direction. I've been creating instance variables and then putting the spawn values of whatever I've wanted to modify in them, and since they are relative to the instance it's been working. Would be nice to just be able to modify the size of an instance sprite without having to first pull the width and height of the instance as it's created and assign that to two variables, then use those variables as the relation to what I want the width and height to be, but I'll get over it :)

    As an example of what I was trying to accomplish when I started this whole train of thought the other day, here is a test/model:

    https://www.sugarsync.com/pf/D743182_344420_8627095

    Enter loads the gun, space fires it.

    Here I wanted steam to be created during the canister ejection, like it was depressurizing. Which meant creating a "particle" like effect. After I started it I realized that each "particle" was being affected the same, which led me to this forum post. Now, as you can see if you run it, when the canister is ejected each particle acts on it's own. Looking over the events that make that possible it's not as bad as I thought it would be, but if I wanted to copy/past this same set of events to another object I couldn't. I understand families are coming and it'll be interesting to see what that is all about.

    I think my lack of knowledge on how javascript works is partly to blame here, and the new way of accomplishing things with C2 vs what I'm used to is the other part. I'm learning though, and hopefully someday I'll be able to help out on the forums here as you both have so graciously helped me.

    Thanks again for the time and effort :)

  • well, i don't know if it's the best way to do it, but I've been testing a few things that would allow independent instance based behavior, without using behaviors. So far the best options seems to be the "over another object" option. Though I'm still interested if anyone else has a better method.

    Thanks for the patience.

  • I understand. I have not done a good job of explaining myself, but this is as I had come to understand it before my forum post, and the reason for my initial question.

    so then, with the current system, what I'm looking for is an "on creation" method for an instance. Does this exist? So far I only know of adding behaviors to accomplish this.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hmmm, either I am missing something or we are talking about two different things. When I use the event system to select an object, I only get a list of the original object types, not the instances of them. As well as in the layout I do not see any unique identifier for the instances.

    I have made a test project. All i did was create a sprite, then make two instances of that sprite. I have two events. One waits 5 seconds and then destroys the sprite. The other moves the sprite 30 pixels at 45 degrees. When ran, after 5 seconds the original sprite is destroyed and so are the two instances of that object. If you hit spacebar before the 5 seconds is up it will move all the sprites 30 pixels.

    sugarsync.com/pf/D743182_344420_8626501

    I really do hope that I am just missing something.

    Now, I have noticed that if your event is more of a condition like "if collision with bullet, then destroy" it will only destroy the one object that the condition was true for.

  • Hey, welcome to the forums!

    Thank you, it's been a few years since I've hit up any forums, I'm really intrigued by your IDE.

    .s. what was the "other" system? We don't censor mention of competitors here, because we're confident Construct 2 is the best.

    Good to know, I wasn't sure and didn't want to make anyone mad. The IDE I'm referring to here is called "Unity 3D".

    ou can do this in the plugin/behavior SDK. Javascript doesn't employ any encapsulation (e.g. private variables or functions) so by its very nature you can edit anything in the runtime at any time from a plugin.

    Cool! I'll do a little research on accessing other variables through javascript, this is very interesting to me. Do you know of any plugins that use this, as an example?

    e've never been keen on the idea: we want Construct 2 to be an event-based tool only, so we can focus all our energies on to making a great event system, rather than a half-baked event system which you're supposed to ignore in favour of script to do anything serious.

    I had a feeling this was the case, and I must say, your implementation of an event system is the best I've ever seen, it was the original reason I stuck around to check out C2.

    I think that my issue isn't the event system, I really like it. What I want to be able to do is put events on objects directly. So that each instance of an object operates independent of another. Which, may be possible, and maybe my lack of understanding is to blame here.

    When I put more than one instance of an object and then later want to modify that object it seems that all instances of that object are subject to the same command, and as far as I can tell, you can't pick one specific object through the event system (though you can pick them and modify them individually through the layout). Also if I could "reuse" these same group of events to be applied to other objects, it would increase productivity (this may be relative to the "family" thing you mentioned, which I would like to know more about).

    This is what first led me to want to develop plugins as I've stated. Because, if I've understood the system correctly, when you have a random command (like rotate random degrees) as a behavior, every time an instance of that object is created it gets a new random number, but if done through the event system is gets one random number and applies it to all instances of the same object? Maybe I'm missing something?

    dding script via a third party plugin currently isn't actually really possible

    Again, my lack of knowledge/skill may be the issue here, but I was thinking more of passing strings as variables to the runtime and doing stuff with it there. The "scripting language" part would be the conversion from Forward 100 to "whatever makes something move forward", i guess it'd be with a lot of functions, etc, and is a huge endeavor. I think the "ZigZag" plugin does something similar, though I've yet to fully read through his code.

    I respect your goals of C2, and would opt not to work toward things you guys feel circumvent what you are trying to accomplish, and if something like this falls into that category I would not attempt it.

    Mostly it seems this is relative to the "if i could apply events at the object level" thing I was saying above. Cause this is what I'm really trying to accomplish.

    e have an official particle plugin planned

    Cool :) I'd opt to not do one on my own then and focus on things that you guys are not working on. We'd get more accomplished that way :D And, of course, I'm still a long way off from doing something that complicated, IMO.

    Thanks for the quick reply. If you have the time/patience to clue me in a little more I'd appreciate it.

  • although there isn't a "plugin", we can still use the exported animations, correct? Even if it was something like exporting a bunch of png files and then importing them as an animation in C2?

    I'm downloading the lite version now to play with it, and am half tempted to buy the pro version (only $6), just to support the development of your project because I believe in what you are trying to accomplish.

    Thanks for hitting up these forums, or I might not have run across this tool.

  • 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