Wastrel's Recent Forum Activity

  • Yann makes the best pancakes!

  • shigalov2011, to clarify what you are asking: you want a plugin which will allow you to generate a window within the Construct 2 canvas, as opposed to an HTML window. Is that correct?

    If so, there is currently no plugin which will do that. I have been working on a project which requires in-game windows which have the same functionality as OS-style windows. A large amount of work is required to combine all of the components of a functional window, and one plugin will probably not be able to do everything required.

    I have been building windows for my project using sprites and events, and it has been a fairly complex process.

  • I figured as much, I just wanted to verify.

    Thanks!

  • Tom, I keep losing connection to the Scirra site. It tells me the site is offline.

    I just wanted to make sure it wasn't something on my end.

    Thanks!

  • Your plugin idea is kind of against the grain of how C2 is designed.

    Understood. I will scrap this and try a different tact. Thanks for your patience.

  • Ashley & rexrainbow, I have been using firebug all along, but during the process of writing this plugin, it became clear to me how much I still don't understand about JavaScript in general, and the C2 implementation specifically. It has been quite a learning experience. :D

    I believe I finally had a eureka moment yesterday, and it all started making a lot more sense. After re-reading all of these posts (for the hundredth time), I believe that I am not being clear as to what I am trying to accomplish.

    Perhaps this will make it a bit more clear:

    1. The constructor opens a new project.

    2. They add a Sprite & Keyboard object to the layout.

    3. They add my plugin (let's call it MyPlugin) to the layout.

    4. In the event sheet, under the On start of layout condition, they add the definition action from my plugin (MyDefineAction). MyDefineAction contains three params: Object, Property, Value.

    5. For Object, they select Sprite. (Using the AddObjectParam function.)

    6. For Property, they select Sprite.Angle. (At this point I am using the AddAnyTypeParam function, but this just refers to the value, not the property index.)

    7. For Value they enter 90.

    8. They add a Keyboard-->On Space Pressed condition.

    9. Under this condition, they add the MyPlugin.MyExecuteAction action.

    10. They export the project. During the export, the MyDefineAction function in the run time adds all MyDefinitionAction actions to a hash table, which includes the Object reference, the property reference, and the value.

    11. When Space is pressed, the property in the referenced object is changed to Value.

    What I am looking for is a way at step 6 to capture the index of the property. Then at step 11, I would reference the object and property index to change its value. I can't predetermine what the property will be, so I need to use a reference passed from the edit time, rather than the hard coded property name.

    To answer concerns about the index being unsuitable, the constructor will define an existing object and property at edit time. The index number won't change after export or when the project is run. If the plugin programmer modifies the properties in the future, it won't matter, because the property index would be determined dynamically at edit time, after the plugin has been added to the project.

    I apologize for the wall of text, and also if you already understood what I was trying to accomplish. I just feel I am very close to getting this to work.

    Thanks!

  • Ashley, I understand what you're saying. I need to be able to dynamically reference a property in an object, but I can't use a string due to minification, I can't use an index because they can change without notice.

    I will continue to search for a way to do this, because I'm confident it can be done. I realize you are very busy and I really appreciate the time you've taken to answer my questions.

    Thanks!

  • Ashley, I'm working on some plugins to support a larger goal of creating a suite of AI tools. This particular plugin will manage data transformations, e.g. the constructor will define a transform with properties from various objects, along with a value to which the property should be changed.

    When the constructor is defining the transform, they will choose an object, and the property of that object to be changed, and enter the value to which it should be changed.

    I forgot about minification. :-< It does indeed break the plugin.

    Since there are no static property definitions, like a PID or something, and using the name won't, I suppose I could use the index number of the property, since I assume that doesn't change.

    Also, maybe this is something that would be better handled using a plugin/behavior combo.

    Thanks!

  • Also, if you're running Windows 7, press Windows Key + Left Arrow, and that should reset the window to the main display. You may have to press it a couple of times.

  • Each plugin has different properties, so you'll need some way to identify the plugin type, or detect the presence of expected properties.

    Ashley or rexrainbow, is there some easy way to do this?

    I have been reading the SDK manual, but I'm not clear from where the set of properties and/or their types can be retrieved. I tried using instance.properties[index], but this gives the value of the property, and there appears to be no way to determine the type using properties.

    Basically, what I need to be able to do is take an object reference and a string representation of one of the properties of that object, then use those to reference an external object (which I can do now). By external object, I mean a plugin other than my plugin.

    I then need to determine if the property reference is a native property of the object, an instance variable, or a property of a behavior. I think I am close to figuring this out, but I may need a gentle push in the right direction.

    I also need to determine the property type, which I can't seem to figure out at all.

    Any help would be appreciated.

    Thanks!

    BTW, I decided not to use the plugin/behavior combo after all. It didn't seem to help with the direction I was trying to take.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Sorry to resurrect an old thread, but today I discovered another method to solve this issue. This method requires Windows 7.

    1. In the task bar, select the application which is opening on a different monitor.

    2. Press Windows Key + Left Arrow key.

    This will move the selected application window to the left side of the main display.

    I hope this helps someone else like it's helped me.

    Thanks!

  • rexrainbow & Ashley, thanks for your replies. I see now where the disconnect was in my thinking. I was approaching the problem from the wrong angle.

    I think I'll look more into the behavior/plugin combo.

    Thanks for your help!

Wastrel's avatar

Wastrel

Member since 21 Sep, 2011

Twitter
Wastrel has 2 followers

Trophy Case

  • 13-Year Club

Progress

13/44
How to earn trophies