0 Favourites

Automaticly added Alterable values.

This forum is currently in read-only mode.
  • The requestis: If you have an event that says: set badguy.value('damage") to 5 (badguy.value('damage')+5), and the player doesn't have a value named "cool", a new value should be given to the gunner and set to 0.

    In this case if you have a family named badguy, and want this event to affect all of them you just have to give the sprite the family and it will work. Like it is now you have to add a new value each time you create a new enemy. Also, if you have events affecting the values of a family and then you give a new object this family which doesn't have that value, all conditions and actions affecting that value is removed. This is VERY annoying (know that out of experience).

    Another example: If you have a family called "friendly" and an event saying that when you overlap friendly, the friendly's value "say" is displayed in a text object. With this event you have to give all friendly units a value "say" even if they don't say anything. With the system i request you could have an event that does something like (i don't have the energy to write like real code) If the friendly's value say is not empty; display the text. (you could right now use the "value exists" condition, but it would be easier this way).

  • YYYEEESSS!!! i requested the same thing for family alterable values before and i would STILL like to see that implemented!!! =P

  • I'm not sure what you mean... however I am very short of sleep after a late night out and still feelin seedy

    Do you mean if you write the expression

    MyFamily('foo') + 1

    Then 'foo' gets added to MyFamily ? I know it works for object types but possibly not families...

    and/or did you mean if you add a sprite to a family, then any variables that were in the family and are not in the object type should be added automatically?

  • I ment the first one.

  • well ... my idea was for adding alterable values to families (possibly from the families editor window) such that you can manage the all the alterable values for the family in one place and not have to look at different sprites trying to make sure they all have the same alterable values

    so say you had a various families:

    the "enemy" family would all have the alterable value(s):

    _ available health

    _ max health

    the "shooter" or "gunner" family would all have the alterable value(s):

    _ current ammo

    _ max current ammo

    _ ammo clips

    _ max ammo clips

    the "psychic" family would all have the alterable value(s):

    _ available mana

    _ max mana

    and if we could add a sprite to a family by simply dragging sprite icons and dropping them on top of a family in the families window that would be even better!

  • Everyone keeps saying "alterable values." They're Private Variables

    "Alterable values" are what they're called in that "other program."

  • oops.. sorry. Private variable. Well, i still think automaticly added variables would be the best. Then you don't even have to touch the private variables! You could just set their initial value with an event if you wanted to!

    The best would be a popupp window asking "The value 'whatever' does not exist in this object. Do you want to add it?"

  • I'll bump this thread now since i think it is a very important issue. Especially the one where adding a new family just removes all events with values using that family.

    ps. don't kill me. I like to be alive since you're less dead that way.

  • Obviously, families need to be improved a few steps. Especially since they will be a major part of almost any large project.

    I encourage any improvements that will lessen the punishment of using trial and error.

  • A return from long hiatus \o/. I was in the finnish army for six months. I have been back for a month but haven't got time to lurk here .

    I have few questions about families. I made a sprite and a text object. I assigned them to family Blue. Then I opened the event sheet editor and checked what conditions and actions "Blue" would contain. They were actually exactly same as sprite's features. ALTHOUGH the family contained a Text object also. If I assigned the family first to the text object, the family would get the features of the text object. However, a Text object and a Sprite do have common properties, for instance, they both have private variables and they both have action "destroy". But when I tested incrementing a variable 'yeah' (

    MouseKeyboard: 6 On key Enter pressed
    

    BlueAdd 1 to 'Yeah'[/code:630vlyhr]

    ) which I created to family blue, according the debug dialog, none of the objects got their values increased. As I tried to set variable to 5, Construct crashed. As I tried to destroy "Blue", it worked and both objects destroyed. Some bugs here, eh ;D?

    But my question is, if there is many object types in a family, will or should family "inherit" their all features? And should user be able to manage some family features so that the members of the family would inherit them? Currently adding a private variables to family just adds the private variable to the each member of the family. Removing the family from an object doesn't remove the variable set by the family, and adding new member that doesn't have the common variable to family totally removes all releated events. This is deifinitely a bad thing. I event managed to mess my variables up so that one sprite had three variables: "yeah", "yeah" and "". Yes, same variable twice and a blank.

  • Ah, you shouldn't be able to add different object types to a family. Families all have to be the same type of plugin (ie. all sprites, all text). You shouldn't be allowed to add text and sprite to a family - that's why it messes up and crashes.

  • Ah, you shouldn't be able to add different object types to a family. Families all have to be the same type of plugin (ie. all sprites, all text). You shouldn't be allowed to add text and sprite to a family - that's why it messes up and crashes.

    I realised one more thing about this. Even if the objects that belong into family are of same type, their behaviours might not be. How families should support this? I noticed that currently using families with behaviours doesn't work.

  • Behaviors are only included if all the objects in the family have the behavior.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Behaviors are only included if all the objects in the family have the behavior.

    That's why I they don't work - I had the physics and dragdrop behaviors with every member, and dragdrop doesn't show in event sheet editor's tabs at all and physics tab is empty.

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