First Plugin, where is it

Forum for plugin, effect and behavior programmers. Please use the Help & Support forum for help using Construct.

Post » Fri May 27, 2011 2:59 pm

I got through the tutorial found at ... #Preparing

and I managed to compile and run it ok. The problem is, it does not appear anywhere on construct! where is it.

Another question: in the Edittime.cpp there is a comp flag called #ifndef RUN_ONLY, which does not appear on the original tutorial. Should I let it in? It makes my code grey on VSC++ 2008... is that part of the code actually run?
Posts: 9
Reputation: 443

Post » Sat May 28, 2011 8:33 am

Your plugin should be in the ..\..\IDE\Plugins\Runtime folder.
You can change this in the properties of the TemplateSDK under Configuration Properties -> Linker -> General -> Output File.

I have the same problem with the grey text in Eddittime.cpp. The grey text will not compile because the compiler directive RUN_ONLY isn't defined anywhere.
Can anyone help us n00bs?

Edit:Never mind, I figured it out.

You're actually making 2 plugins: 1 for the edit mode of Construct, and 1 for when your game is running.
The code is laid out so that when you are editing the Layout part, the runtime code is greyed out, and vice versa. To switch between the 2, you can select "Debug" and "Debug Runtime" at the top of the screen in Visual Studio. It takes a few seconds for the editor to catch up, so don't panic if the text doesn't immediately turn normal.
Posts: 39
Reputation: 1,128

Post » Sat May 28, 2011 10:29 am

You can select release and runtime, instead of the debugs. When you do you batch builds, you should choose these unless you plan to debug the plugins with visual studio
Spriter Dev
Posts: 3,285
Reputation: 17,151

Post » Sat May 28, 2011 5:57 pm

To be honest, debugging is kind of a pain in the ass too. You have to perform these steps:

[list:58kh1iia][*:58kh1iia]Batch build debug and debug runtime.[/*:58kh1iia]
[*:58kh1iia]Move them into the Construct directory.[/*:58kh1iia]
[*:58kh1iia]Boot up Construct.[/*:58kh1iia]
[*:58kh1iia]Build a test program cap using the new plugin, so that Temp.exe is updated.[/*:58kh1iia]
[*:58kh1iia]Finally, set your IDE to debug with Temp.exe and run it.[/*:58kh1iia][/list:u:58kh1iia]

Sometimes this doesn't even work for some reason, but this seems to be the only way to do it. Every time you make a minor change to the code, while debugging, you have to perform these steps. So yeah save yourself the trouble and run in release and runtime unless you absolutely have to debug. Debug also runs slower, which for most plugins will be an unnoticable difference unless they are processor intensive. I noticed a slowdown with GridTree running in debug.
Posts: 221
Reputation: 2,272

Return to Construct engineering

Who is online

Users browsing this forum: No registered users and 0 guests