Im new, can you make classes ?

For questions about using Classic.

Post » Thu May 28, 2009 10:36 pm

:) Hey everyone, i'm new to the forums, been looking around and hiding away in the shadows of the forum because i didn't know what to ask.. but now ive thought of something..

So basically i was wondering is it possible in construct, to make classes, and then from those classes create instances of a class. For example i used to use gamemaker quite alot, so im used to programming and game logic and all that is to do with games, and one of the most important things ive noticed is the power of Object Oriented Programming. So i was wondering if that was at all possible in Construct, i know you can make families of things, but im not quite sure on how it works.

O ye by the construct is pretty cool, ive only used it for a couple of days now, and its very good and quick prototyping.
B
4
S
1
G
4
Posts: 6
Reputation: 1,562

Post » Thu May 28, 2009 10:55 pm

Its pretty much the same.
In a family to pick a particular object in the family you need only pick the family along with what ever parameters. Like if family.blue is at x coords then any object in that family, and at that coord will be selected.
Like wise you can select all objects in a particular family by not giving any parameters.
You might also want to look into containers. The difference being that one container object is always selected with the other.
Then there's the object pairer....
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Fri May 29, 2009 1:10 am

Thanks for your reply, well the reason i was asking was not so i can manipulate entire families in the game, its more to help me with building a game.
For example if i create a sprite object, that has certain variables and functions only that only this object has access to, i can then make children from this object that have similar properties, but look different.
Like an object that holds Active sprite data (random object name), and then that can then be turned to stuff like NPCs, Enemies.. etc ?
B
4
S
1
G
4
Posts: 6
Reputation: 1,562

Post » Fri May 29, 2009 1:14 am

it wouldn't be classes
but you can create your basic guy
then right click | copy
right click | paste clone
then you can change the sprite you use
but all other properties will remain
because it is a new object that is just a clone of the original
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Fri May 29, 2009 1:21 am

Event based programming is completely different to scripting. To give you a feel for it, try one of the tutorials.
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests