it also would be an awesome feature if when you did this (if you managed to link them to IDs) you also gave us the ability to drag variables up and down the list to rearrange them. this would help a lot of people order their variable list, which always seems to get in a complete mess....well at least mine does lol
Why not implementing a "get an Alterable Value (or Global or whatever) by NAME" functionality? Reordering and deleting is ok of course but if it is hard to implement could you please add this functionality? Maybe it would give you a list of the used names too, so you don't have to write...
Promise, last time I post about this matter...I have posted 2ice and got no answer and comment on this...So I guess either I don't describe it well or noone cares about it...
Byt he way, giving a list of the fast loops names in use, when working in event editor, is out of the question?
Seems like those of us who rely on qualifiers sharing specific alterable value indices would still need the current method (ie fixed index values). I guess if there was a way for Fusion to store shared values based on names, that would be great. But then we wouldn't be able to access the value by index anymore.
Personaly I use qualifiers and soemtimes when I copy objects and code from one project to another, I just need to add one vlaue that was already beiing used by another part of the code.
Lets say there is an object A with the "Hitpoints" value on Alt Val A and there is already some code about it.
Then I copy object B that already has Alt Val A occupied as "Speed" for example.
All I want to do is to add the "Hitpoints" value and code nothing. Now as is, I need to change either the code for "Speed", or the code for the "Hitpoints"...
For me this is hell... Especially if there are numerous values occupied and multiple lines of code that use them.
I need this functionality...Reordering, migrating, searching, somekind of solution at least.
Something is telling me I am not clear enough in my discrition but I am doing my best...
@AftPeakTank I understand where you are coming from. I try my best to plan ahead for this sort of thing, but there are always times where you want to add in a new variable later on that you didn't consider. And it would be more convenient to insert it somewhere between existing vars. I don't know the best solution, but since the existing engine uses the variable index and not the name, I hope Clickteam can find a good solution for everyone.
I imagine that referencing named variables might hurt performance a lot. I guess it would be kind of like using strings, which is much slower than values. Plus it would have to search through each altVal of each object in the frame every time. If your events reference named variables 100 times, and you have 50 active objects, with an average of 10 altVals used in each, then wouldn't Fusion need to search through 50,000 items each loop just to find the correct altVals?
Reordering would be fantastic, though I'm sure it would take CT a lot of work to implement and test.
@AftPeakTank : I don't know if this would be any good, but perhaps you could use this workaround. You make a new active object called assistant or something. To reduce performance impact, you make it 2x2px, no fine collision, no create at start, and not visible at start. You call its first AltVal "assistantID". Then the rest of its altVals are "hitpoints", "speed", and other values that you want to be shared by different objects. Then, at runtime, whenever you create any object (eg. a skeleton enemy) you create an assistant object and set assistantID to fixed("skeleton").
Also, you give ALL of your objects (except the assistants) a qualifier (if you have 2.5+ you can rename this qualifier to "group.everything")
Then, whenever you want to reference hitpoints, you just search through the assistants, which all have hitpoints in the same altVal slot. For example, this would subtract hitpoints from skeletons every time they collided with the player. It would also destroy any object whenever its hitpoints reached zero.
-player collides with group.enemy
-assistantID("assistant") = fixed("group.enemy")
......subtract 2 from hitpoints("assistant")
-if hitpoints("assistant") <= 0
.......run forEach loop on every assistant called "kill objects"
-on forEach assistant "kill objects"
- fixed("group.Everything") = assistantID("assistant")
This method would be a bit convoluted, and you'd end up with double the objects, but I just thought I'd throw it out there. Actually, it might be easier just to redo some of your objects with rearranged altVals
@Volnaiskra , you are probably right and that's a good workaround...
Well I don't have really in depth programming knowledge but as far as I know, there is something called enumerators, which may appear to the programmer as strings but In fact are indexed lists. I don't know how the code of Fusion works but I have to assume they use something like this.
Also I have to assume that they can implement a fast way of doing it...
Then, they might not...
Then, they might should! Even in .Net, lists are working pretty fast. And .Net it's a managed language running in fact in a virtual machine kind of.
Again my knowledge is limited but I expect that something must cross their mind on how to implement it... But I dont see any interest from Clickteam's side whatsoever.