Create the same Object with different properties

Get help using Construct 2

Post » Wed May 08, 2013 9:48 am

Hi Constructors,

How do I create Objects with effect and without effect?

I have object on the stage let say a ball. I want this object to be duplicated but the duplicated objects has Effect in it and some are not.


I'm thinking of having two objects and the other object with effect?

Any advice.


Thanks,
-morex
B
23
S
6
G
3
Posts: 39
Reputation: 4,739

Post » Wed May 08, 2013 10:08 am

One possibility is You could simply have 2 versions of the objects and make both objects fall under the same family. You want more specific details?
I got a game that you multiply, breath fire with two heads and brawl foes to oblivion with your clones: http://www.newgrounds.com/portal/view/660664 (use Chrome on Windows for best performance)

My sites:
http://twinblazar.deviantart.com
http://twinblazar.newgrounds.com
https://twitter.com/twinblazar
http://www.pixiv.net/member.php?id=15072448
B
24
S
9
G
11
Posts: 408
Reputation: 8,040

Post » Wed May 08, 2013 10:47 am

You could have one object and create multiple instances of it in the editor (ctrl drag object in the layout). Then, either:

a) disable effect in the properties of one instance.

b) give object an variable like 'effect', which you can use to see which object should have which effect enabled. Set up events to disable/enable effects for objects based on this variable. You can then use this variable to set effects properly during the play.
B
24
S
8
G
7
Posts: 756
Reputation: 7,192

Post » Wed May 08, 2013 11:35 am

Thanks keroberos. That is what i'm doing now but I feel it's not the best way.

@vee41, Thanks. I think that's the correct approach but my problem is when i enable the effects, all objects are affected. Do you have a working example to share?

Thanks,
-morex
B
23
S
6
G
3
Posts: 39
Reputation: 4,739

Post » Wed May 08, 2013 12:49 pm

[QUOTE=morex] Thanks keroberos. That is what i'm doing now but I feel it's not the best way.

@vee41, Thanks. I think that's the correct approach but my problem is when i enable the effects, all objects are affected. Do you have a working example to share?

Thanks,
-morex[/QUOTE]

Heres a quick demo:

Evil sprites

The last event is function you can call to enable/disable effect in certain situations, you could easily adapt something similar to your own project.
B
24
S
8
G
7
Posts: 756
Reputation: 7,192

Post » Thu May 09, 2013 3:30 am

Awesome example @vee41. Very nicely done. This is what I have in my mind but I don't know to implement in Construct. Thanks again for your effort and I appreciated it so much.
B
23
S
6
G
3
Posts: 39
Reputation: 4,739


Return to How do I....?

Who is online

Users browsing this forum: Artpunk, gregorysforster, onzephyr and 2 guests