Automaticly added Alterable values.

New releases and general discussions.

Post » Sat Aug 02, 2008 8:10 pm

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).
B
8
S
2
G
5
Posts: 744
Reputation: 3,288

Post » Sat Aug 02, 2008 11:31 pm

YYYEEESSS!!! i requested the same thing for family alterable values before and i would STILL like to see that implemented!!! =P
B
2
S
2
G
5
Posts: 293
Reputation: 2,236

Post » Sun Aug 03, 2008 3:06 pm

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

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?
B
4
S
2
G
5
Posts: 641
Reputation: 3,011

Post » Sun Aug 03, 2008 3:53 pm

I ment the first one.
B
8
S
2
G
5
Posts: 744
Reputation: 3,288

Post » Sun Aug 03, 2008 7:51 pm

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!
B
2
S
2
G
5
Posts: 293
Reputation: 2,236

Post » Sun Aug 03, 2008 8:25 pm

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

"Alterable values" are what they're called in that "other program."
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sun Aug 03, 2008 9:24 pm

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?"
B
8
S
2
G
5
Posts: 744
Reputation: 3,288

Post » Sat Aug 09, 2008 11:31 pm

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.
B
8
S
2
G
5
Posts: 744
Reputation: 3,288

Post » Sun Aug 10, 2008 2:42 am

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.
B
2
S
2
G
4
Posts: 259
Reputation: 1,968

Post » Tue Aug 12, 2008 12:29 am

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 :P.

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' ([code:630vlyhr]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.
B
3
S
2
G
5
Posts: 263
Reputation: 2,201

Next

Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 5 guests