Is there a way to create class for object ?

0 favourites
  • 3 posts
From the Asset Store
Fully commented source code/event sheet & sprites to create a space shooter game
  • Hello guys.

    It’s been a long time I’m using construct to create prototype and little Games, and I’m facing a huge problem.

    As a graphical designer I’m not a developer. But I work with them from 17 years and I learnt a lot about coding, thanks to them.

    Using Unity for 10 years I understand a big things. When we create a game it’s really usefull to have independant elements. So we can create a game controller for our player and use it on différent project.

    Or we can create a behaviour for one enemy and use it on other ones.

    If I’m right it’s called « class ». And I’m not sure it exists on construct. So when I create a game on construct, each time I have to recreate players, enemys, bonuses…

    Is someone can helps me?

    Thanks you ^^

  • Well if you build a nice eventsheet that contains all the players inputs/actions etc. you can just copy that eventsheet into a new project and have it work there too. Only thing is that the new project needs to have all objects used (e.g. the player sprite) already available and with the same name as the old project.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hello guys.

    It’s been a long time I’m using construct to create prototype and little Games, and I’m facing a huge problem.

    As a graphical designer I’m not a developer. But I work with them from 17 years and I learnt a lot about coding, thanks to them.

    Using Unity for 10 years I understand a big things. When we create a game it’s really usefull to have independant elements. So we can create a game controller for our player and use it on différent project.

    Or we can create a behaviour for one enemy and use it on other ones.

    If I’m right it’s called « class ». And I’m not sure it exists on construct. So when I create a game on construct, each time I have to recreate players, enemys, bonuses…

    Is someone can helps me?

    Thanks you ^^

    I think your best bet would be to work with "Families". You can make an enemy family, for example, and through the event sheet, specify how the enemy will interact with the game. Any object you place in the Enemy Family will adopt the family's behaviors.

    You'll need to make an Enemy Family for each game/project you want to re-use the logic for. Then, you should be able to just copy and paste whatever code you have.

    So rather than having an enemy sprite -> on collision with a player sprite, for example (which can only be copied onto other projects with the same sprite names and behaviors), you can get around this a little easier with families.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)