[Solved] Create Object on different Layout

Get help using Construct 2

Post » Fri Dec 20, 2013 5:45 am

Hi ,
How do we create a object in different layout?
Example:

The current layout "A" ,I want to create an object on layout"B" when i was on layoutA.

any ideas ? Thanks !Zaoeyo2013-12-20 08:55:48
B
5
Posts: 17
Reputation: 291

Post » Fri Dec 20, 2013 6:36 am

You can't. Layout's are just an reprentation of the current assets and code to be run. They don't actually represtent anything else than that.

You can however use dictionary/array/webstorafe to store some data. then at the start of the layout create an object based on the stored values.
B
90
S
18
G
9
Posts: 2,455
Reputation: 15,018

Post » Fri Dec 20, 2013 7:48 am

You can't create an object directly in another layout.

What you can do is create conditions in layout A which are checked in layout B and in the eventsheet for layout B create the object if those conditions are met.

example:

in layout B you have this event:

System compare global variable VisitedA = 1
System trigger once
- Create object

And in layout A you have this event:

On start of layout
- set global variable VisitedA: 1
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Fri Dec 20, 2013 8:55 am

Thanks guys! it worked well !
B
5
Posts: 17
Reputation: 291


Return to How do I....?

Who is online

Users browsing this forum: charliesan763 and 6 guests