What is the Attributes counterpart in Construct 2

Get help using Construct 2

Post » Mon Nov 11, 2013 11:44 am


hi everyone

i had a question about attributes in construct classic.
i was looking at @Yann project from the classic version and i noticed that there are "Attributes that you can add.
I was wondering what the counterpart to attributes are in construct 2.

i seen a left and right attribute and the condition was to check for collisions on the attribute.How do you check for a collision on Left or Right?
It dosnt make sense to me.

the link to the post is right here

LINK
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,378

Post » Mon Nov 11, 2013 1:13 pm

Attributes were moved to behaviors in Construct 2. Notice the Solid attribute is now a behavior, for example.
Scirra Founder
B
397
S
236
G
88
Posts: 24,423
Reputation: 194,560

Post » Mon Nov 11, 2013 7:32 pm

@Ashley Very Cool,
I was wondering Why one of the Attributes were named Left and Right and had collisions?
I wanted to know this because im trying to learn from Yanns Cap,It has some Cellular Automata Algorithoms in it.And i just didnt see how to make Left or Right detectable through collisions.
Thanks for your reply @Ashley its nice to hear from the Top Gun.
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,378

Post » Mon Nov 11, 2013 7:33 pm

'Left' and 'Right' were never built-in attributes, so you'd have to ask Yann.
Scirra Founder
B
397
S
236
G
88
Posts: 24,423
Reputation: 194,560

Post » Mon Nov 11, 2013 7:43 pm

@Ashley Thank you,
Hopefully @Yann will see this and be able to explain how this works,I know its an old cap file but it has valuable info that i need for my project.
Thanks again Ashley have a good evening.RookieDev2013-11-11 19:45:11
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,378

Post » Mon Nov 11, 2013 8:03 pm

@RookieDev
You're a very lucky man.
I'm so busy these days that I don't really look at the forum too often, and it seems the @ system is a bit broken since I wasn't warned at all about your post.

Since I don't have CC installed here, if you can send me a screenshot of the events so I can remember what it was about (:
B
66
S
22
G
14
Posts: 1,484
Reputation: 16,511

Post » Mon Nov 11, 2013 8:38 pm

@Yann i do not know how to capture screenshots from my computer,
this really sucks im going to try and install a program or something.
I hope i can still catch you before you get really busy again.
thank you for your reply Yann.
im working on the screenshot right now
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,378

Post » Mon Nov 11, 2013 8:43 pm

@Yann Here is the only way i know how,Its through Dropbox,i just took a snapshot with my tablet.

https://db.tt/v76qslN1
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,378

Post » Mon Nov 11, 2013 10:07 pm

You can get a screenshot by pressing the "PRTSC" button on the keyboard and pasting into mspaint.

The image you posted was actually from one of my projects and the cap is in this topic:
http://www.scirra.com/forum/how-to-make-minecraftlike-lavawater-physics_topic41488_page1.html

There isn't a direct counterpart of custom attributes in C2 although I think you could do something equivalent with families, Boolean instance variables and some more events. Although I would opt for a different approach.

For the example of an attribute like "left" you could do something like the following:
1. Make a family and call it "left_attr" and add any objects that could get that attribute to it.
2. Add a boolean instance variable to the family and call it "left".
3. Then in events or the editor you can give the objects the left attribute by setting "left" to true. Also to reproduce and event like "sprite overlaps left" you would do the following:

left_attr: Is left
sprite overlapps left_attr

Oddly enough after I answered your question about growing grass I made a capx to experiment with similar water physics. It's not perfect but it does work better than the CC version. Have a look if you like but be warned I used some math trickery to reduce the number of events.

https://dl.dropboxusercontent.com/u/5426011/examples19/2dgrid.capx
Left click to draw walls, right to erase.
B
92
S
32
G
109
Posts: 5,291
Reputation: 70,993

Post » Mon Nov 11, 2013 10:23 pm

@R0J0hound

Thank you so much for explaining this to me,The way that is shown makes perfect sense to me,When i first seen that you had the attribute named left in CC,It instantly confused me but from what you wrote i definitly understand how to recreate the left&right attribute.
the CapX file you placed looks amazing on the inside,i cant wait to study it even more and see what i can learn from you.
from what i seen so far the water runs very very smooth its impressive.also thank you for filling me in on the prtsc button.
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,378

Next

Return to How do I....?

Who is online

Users browsing this forum: beohs, Google [Bot] and 14 guests