I've always wondered why the "Create Object" action doesn't have a button to use the expression editor instead. +1 for the above to create at x,y, but also specified layer would be great.
Printable View
@piscesdreams sure, having it would reduce some clicking, but you can create and set position on the same event, and this should work as long you're not creating multiple of the same object on the same event (multiple actions)
If you are creating multiples, you can either separate this on a loop, so each time it runs it creates a instance and set position (separated action) or you can reset scoping after each creation by calling a Fast Loop (this will also clear the selection on the event's conditions so be aware), you can call this loop like "Clear Scoping" and "On loop" you can do something lightweight and that wouldn't do anything in practice, just to clear the scoping, like setting global value A to itself.
Maybe away from "negate" topic, another new feature that can save clicks is "fixed-based values".
E.g., When we need to use values of two instance of one object, we cannot retrieve one's and give it to another directly in one event, temp values are needed: scope the first one, save all needed values, then scope the second one and do calculations. The more values needed, the more complex the code is. If we can retrieve alterable values via fixed value, a lot of works can be saved. (Expression can be like Alterable Value A("Object", >Fixed Value<), as an overload of normal expression. And this not only for alterable values, but also available for other properties like scale and angel)
Another expression that maybe useful is "number of selected objects" in object's count expression popup, and it seems not difficult to add as there is already "oilNumOfSelected" in objInfoList class. Currently we need to run a for-each loop and use a temp value to count the selected objects.
Some old conditions/actions also don't work with expressions, like "pick objects in zone"/"check mouse in zone", which makes it unusable in some situations like generated levels, and need to use alternatives like "collision of a big object"
Great suggestion, @defisym !
Getting stuff by the fixed would be pretty cool, along with that, a way to get the fixed value of each instance scoped might also be cool.
So you specify the index of the selected objects and it returns the fixed value of it, this way you could easily compare two instances in a single event!
To not crowd the menus, perhaps these could be two expressions:
New Objects ---> SelectByFixed( > Selection Index <) : When on collide/overlap or conditions that has an order, index would be based on it, when not, would be by order of creation or perhaps Z-Order.
New Objects ---> GetData( > "Value/flag/X/Y/Z-Order/Layer/Scale/string/etc" < , >Fixed Value < ) : GetData$() Could be used to retrieve as a string.
Thank you guys, nice and interesting suggestion. I'll check how this can be done and if there is any possible F3 compatibility issue (important for such a feature).
I don't remember the reasons why expressions were never added to Create Object, but I can take a look
Just a correction:
PickByIndex( > Selection Index <) NOT SelectByFixed( > Selection Index <)
So it would return the fixed value of the instance.
I think it would be a simple but marvelous addition!
There was many times I had to loop through the selection, store the fixed and some other value I wanted to compare and then after the loop compare the both stored, and with the stored fixed I then could pick the instance...
Would eliminate de need of a temp object or variables for this sort of comparison.
And I guess about my GetData() expression, that would probably either require a third parameter, so one can specify the type and the other the index (along with the fixed)
Either this or having it separated: GetValue(), GetString$(), GetFlag()...
In Frame Editor, would it be possible to add a 10% scale or the possibility to choose the scale itself?
I work in high resolution and 25% is a bit restrictive.
I would love that. Though probably only if the margins glitch I've reported before is fixed also. This glitch gets worse the more you zoom out. At 25% it's quite bad; at 10% it would probably be unbearable.