Events copied between projects sometimes loose actions?

For questions about using Classic.

Post » Thu Aug 27, 2009 4:40 am

I think I may be doing something wrong here, but sometimes when I copy events from one project into another, all the events and conditions are pasted, but all the actions are missing. As near as I can tell, this occurs even when both the source and target layouts contain matching objects. Is there a particular way I should set things up to get the actions to copy along with events?
B
21
S
13
G
8
Posts: 306
Reputation: 5,458

Post » Thu Aug 27, 2009 10:29 am

you can't copy events from one project to another, and you shouldn't try. It can cause problems.
B
25
S
3
G
6
Posts: 1,197
Reputation: 5,620

Post » Mon Aug 31, 2009 7:57 am

Is there any way to reuse code from multiple separate prior projects without recreating all that code from scratch for each new project?
B
21
S
13
G
8
Posts: 306
Reputation: 5,458

Post » Mon Aug 31, 2009 9:50 am

Try event sheet includes.
Then use some shortcuts like .x, and .y instead of sprite2.x, sprite.y, etc.

[url:3gedjcwv]http://sourceforge.net/apps/mediawiki/construct/index.php?title=Event_Sheets[/url:3gedjcwv]
Of course includes still only apply to one project, but expressions are nice to copy pasta.
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Fri Sep 04, 2009 1:51 am

Firstly, thanks Davioware and Newt, I appreciate the info and suggestions. :D I may end up using comments to store partial lines of code with shortcuts as per your suggestion Newt. That is, if that's what you meant by shortcuts. I think that would certainly help, though some of the modular projects I've built would still require considerable work to copy over.

The reason I am interested in copying code blocks from various projects is because I would like to build and test several game engine components in their own project files, so that when I start building a game, I can incorporate only the components that I need. For example, if I have a level editor, a camera system, a path finding system, a function driven effects system, and a custom function driven particle system, all as separate projects, I may only need the particle system and the effects system for a breakout-style game.

At present, I have built a level editor with which I can build levels at runtime, and write and read formatted level files. I also have a project that contains a camera system that has several tracking modes, and quite a bit of code to make complex camera behaviors easy to manage at runtime via the function object. It seems like there must be some way to copy such modules into a new game project, without having to rebuild all that code, and without alternatively having to build all the modules in one single bloated project file that precludes the saving of successive module versions as their own independent files.

I may be wrong, but I thought at some point I had read something about reusable code in Construct that was similar to the mechanism that MMF uses to support reusable code. Wherein if you copy code from a source project to a target project, any object referenced in the code that is not found in the target project will appear as a "placeholder" object, until you right click on it and specify an object from the target project that is to take its place. Construct is a pretty amazing tool, so I figure, it either already has something like this, or that it is coming soon.

In any case, I appreciate the feedback thus far, That said, if anyone has any ideas that would allow the modules to remain as separate files, that would be preferable. I'm looking into and experimenting with this as well, and so I'll post what I find out. :D
B
21
S
13
G
8
Posts: 306
Reputation: 5,458


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 5 guests