Unable to build standard MouseKeyb plugin

This forum is currently in read-only mode.
From the Asset Store
12 unique hits, slashes and spells in transparent PNG sequences
  • Hello guys,

    I've been trying to add an expression to the Mouse & Keyboard plugin but I failed miserably.

    I downloaded the plugin but I can't get it to build with VS2008. I just download the latest SDK so I guess some things changed since the last official build of that plugin.

    All I need is an expression to retrieve the key that has been pressed. Even that, I wouldn't really know how to do it since the only tutorial I found about making plugin was about a coloring sprites.

    I checked in the main.cpp and I quickly realized that it was a bit more complicated that just ADDEXP(Bla bla bla ExtObject::GetKey()).. And I wouldn't have any idea what to put into GetKey() anyway..

    Should I have to get an older version of the SDK to build the plugin ?

    Thanks a lot folks.

  • That tutorial is relevant to any plugin you decide to make regardless of the sprite coloring stuff.

    There's a lot of "grunt work" for every plugin you design, outside simply what the plugin does. You have to explain to Construct what your plugin does, and how to present it to the end user. That's what ADDEXP will do. ADDEXP will also link up with a function you write in Expressions.cpp. That's where you want to place your GetKey stuff. You'll also have to define your new expression function within Main.h.

    ADDEXP is known as an "ACE Table Entry", particularly in your case the "E" in ACE. You want to pay attention to that particular part of the tutorial.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yeah I know the tutorial covers the basics of any kind of plugin.

    The problem is that handling the keyboard device seems to be a bit more complicated than having 2 color values. I know that the same concepts apply no matter what your plugin does but after looking at the standard mouse and keyboard plugin, I don't have the skill to do it from scratch, so I'd like to modify the standard plugin and add an expression to retrieve which key is pressed. (Even that I'll have to dig the internet to find out how to do it, I'm no programmer )

    The problem is that I can't build the plugin, some things must have changed, for example, there's no action/condition/expression files, they're all in the main.cpp.

  • Why can't you build it? You should always provide the error messages you get.

    Also, are you using VS2008 Express? The express edition doesn't have all the necessary headers.

  • Aaaah what was I thinking! Sorry.

    I'm using Visual C++ 2008 VC9 and I get these error messages:

    [quote:10ey5uj1]Warning: compiler or settings not compatible with Construct Runtime ABI. Enabling workaround functions. See SDK docs on 'Runtime ABI'.

    [quote:10ey5uj1].\Main.cpp(184) : error C2039: 'GetControlState' : is not a member of 'VRuntime'

    c:\program files\scirra\sdk\newkey\..\..\Common\VRuntime.h(136) : see declaration of 'VRuntime'

    [quote:10ey5uj1].\res\ConstructSDK.rc2(18) : fatal error RC1021: invalid preprocessor command 'doc3'

    Thanks

  • Also, are you using VS2008 Express? The express edition doesn't have all the necessary headers.

    Is it possible to make alternative source versions that don't need the ATL and MFC for the SDK so express could build plugins like particles, sprite and movements?

    I am having no luck building the SVN plugins with express -

  • I figured out the issue, The common folder in the sdk download is out of date. You need to use the latest version of that folder from the SVN. Click Download GNU tarball to get it.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)