Text in Families

0 favourites
  • 12 posts
From the Asset Store
OpenAI TTS
$10 USD
Text-to-Speech plugin.Allows your Construct 3 project to convert written text into spoken words
  • Is there a specific reason why Text objects cannot be included in the Families?

  • What do you exactly mean? I can make a family of Text-objects. I suppose you cannot merge different object types.

    greet, Joe7

  • Families can only include objects of the same type. So you can have a family of sprites, a family of text or a family of any other object type.

  • yeah I'm aware of that, but couldn't add text objects to a new/seperate family either. Quick C2 restart fixed that problem...strange.

  • Families are associated with a particular plugin type (e.g. Sprite, Text etc). So you definitely can make families of Text objects. You're probably caught out by the fact C2 won't let you change the plugin of an existing family - you can't remove all the sprites from a sprite family then make it a text family, because that would make all the family's events invalid, so you may as well make a new family.

  • Are there any plans to include more than one object type in a single family?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • No, you can't have multiple plugin types in a family - otherwise what happens when you make an event for it? Which conditions, actions and expressions are shown? If an object of one plugin type is picked, but you call an action or expression that plugin type doesn't have, what happens? It doesn't fit the design of families to support multiple plugins in one family.

  • But there will be a way to group different objects, right?

    I can think of a couple situations in which that'd be useful, such as when you want to create/destroy/rotate/move an entire composite object at once.

    It would automatically associate all instances with each other (for instance, a condition that selects one object would include all objects of that group into the SOL).

    That would enable things like a tank emitting smoke particles, complete with a main cannon and a machine gun turret, with a health bar and a player name (for instance).

  • Ashley

    I would expect the family object to collect all the ACEs of all the object types that belongs to the family. It could filter the repeated ACEs and display them just once. The most common, or the ACEs that belongs to all of the types could be grouped in a Common category.

    Then if you add a condition that only belongs to a specific type of object, during execution it would first filter all the family objects that have that same condition, and find the matching objects to be picked and added to the SOL.

    For actions would be the same - first it would filter all the objects that have that same action, then for each object type of this list it would check if there's specific instances picked. If yes apply the actions to those instances. If not apply the actions to all of the objects of that type that belongs to that family.

    This would mean that if there's an action that belongs to two kind of objects (sprite and text), and only one type of object is picked in the conditions (sprite: instances 2,3 and 4), that action would be applied to the picked instances of one type (sprite: instances 2,3 and 4) and also to all instances of the type not picked (text).

    Then by adding a Pick object type condition to families, would be possible to disambiguate which object you want to apply the actions in case you want to affect just one type of object.

    For expressions it would also work the same, with the only difference that when there's no specific instance picked that match that expression, it would return the value of the first object in the list.

    I really wish that families could support multiple object types, specially to allow instance variable comparisons between different types of objects that could be used similarly to classes or tags.

    Take a family of the respective objects and it's variables as an example:

    Family "Scene":

    Sprite: varClass = "rock", varShow = "False"

    Sprite2: varClass = "grass", varShow = "False"

    Sprite3: varClass = "rock", varShow = "False"

    Text: varClass = "rock", varShow = "False"

    Text2: varClass = "grass", varShow = "False"

    TiledBG: varClass = "grass", varShow = "False"

    TiledBG2: varClass = "rock", varShow = "False"

    You could do this:

    Family "Scene": variable varClass == "rock"

    ->Family "Scene": Set variable varShow to "True"

    That would result in:

    Sprite: varClass = "rock", varShow = "True"

    Sprite2: varClass = "grass", varShow = "False"

    Sprite3: varClass = "rock", varShow = "True"

    Text: varClass = "rock", varShow = "True"

    Text2: varClass = "grass", varShow = "False"

    TiledBG: varClass = "grass", varShow = "False"

    TiledBG2: varClass = "rock", varShow = "True"

    This could open a whole new can of possibilities.

  • Animmaniac I'm afraid the engine is just not designed in a way that allows what you've described. It would need a lot of code rewriting... maybe one day in the future, but right now we have to get back to working down our todo list :-\

  • Yeah, I imagine it would need a big deal of code rewriting, but you can't deny it would be a great feature for C2.

    But I understand your situation, it's a difficult task for a two man team.

    Well, at least I can dream about it. And it also serves as a good exercise in problem-solving for me!

  • But there will be a way to group different objects, right?

    I can think of a couple situations in which that'd be useful, such as when you want to create/destroy/rotate/move an entire composite object at once.

    It would automatically associate all instances with each other (for instance, a condition that selects one object would include all objects of that group into the SOL).

    That would enable things like a tank emitting smoke particles, complete with a main cannon and a machine gun turret, with a health bar and a player name (for instance).

    Fimbul

    What you want and are describing are containers, which are on the to do list. Or the pairer object, which can make containers at runtime, though that also hasn't been implemented yet.

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