[r84] Insert objects in Object box issue

Bugs will be moved here once resolved.

Post » Tue Mar 27, 2012 11:52 am

I have found a issue concerning inserting objects directly in the object box when you are currently on the Event sheet tab.

1. Open new project.
2. Go to Event sheet tab.
3. right click in the object box, and choose "insert new object".
4. Add whatever object (Plugin, keyboard, mouse etc etc)

The object is added to the project tree, but is not added to the object box.

For atleast custom plugins, this means they are not initialized and will not work all together, if data is created/set in the pluginProto.Instance function and/or instanceProto.onCreate function.

For my custom plugins, this issue only happens when the "pf_singleglobal" is NOT active.

I also tested with the SDK template, and I got the same issue with the following steps. The only thing I changed in the SDK template, is the "type", which I changed into object, instead of world.

1. Downloaded the SDK template and added it in the plugin folder under a new folder called "Test"
2. Open a new Construct project.
3. Go to Event sheet tab.
4. Added a "On start layout" condition.
5. Right click in the Objects box and chose "Insert New object"
6. chose the "MyPlugin" object from the list.
The "MyPlugin" appears in the Projects tree, but not in the objects box.
7. Add "Alert" action to the "On start layout" condition, and wrote "Doooo" in the Message string.
8. Clicked on the "Run Layout" button.
The browser is open and the background is white, but no message box appears.

However, if I do the same as above, but ignore step 3, and add
the Plugin through the layout tab instead, the Plugin appears in the Projects tree AND in the objects box and is working fine.CodeMasterMike2012-03-27 12:25:53
B
38
S
13
G
9
Posts: 151
Reputation: 8,437

Post » Tue Mar 27, 2012 4:03 pm

This is by design. You've added the object type, but not any object instance. Adding an object type in the layout view gives you the opportunity to place an instance in the current layout, but in the event sheet view there is no layout so no instance is placed.

You should be able to fix it by drag-and-dropping the object from the project bar in to a layout.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Wed Mar 28, 2012 7:18 am

I was so certain that I have been able to add objects like that from the layout tab earlier, but if its part by the design then I must have confused myself somehow.

I cant drag-and-drop the SDK template plugin object to the layout from the projects tree, or any "type: object" as far as I have tested. I can do it with "type: world" objects. But that is perhaps a different discussion.

Thanks for the information and fast reply!
B
38
S
13
G
9
Posts: 151
Reputation: 8,437

Post » Wed Mar 28, 2012 3:26 pm

That's right, only world objects can be dragged in to a layout... I think non-world plugins like Array are more problematic though, since they can't be dragged in to a layout so it's impossible to add an instance for objects added that way. That's a known bug, hopefully we can fix that soon.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests