A "slice" condition or action


#1

Could you add a slice condition or action whereby it cuts an object from an angle. This would be better than using the “scale action” and it would make the creation of a health bar better cause it would slice from one side to the other.


#2

I’m going to second this request :slight_smile:

I am sure you can do this via the javascript console, though i have no clue whatsoever how to code the following in a way the console can understand and execute:

var str = var.value(n);
var f2d = str.toString();
var f2ds = Number(f2d.slice(0,2));

switch(f2ds % 4){
case 0: var.setValue(34,6); break;
case 1: var.setValue(34,4); break;
case 2: var.setValue(34,2); break;
case 3: var.setValue(34,0); break;

default: var.setValue(34,0);
};

This is used to determine the Year Code for any given date. And the only thing now that stands in the way for me to fully automated an internal time/calendar system. I’m presently hard-coding a list of year variables, this is of course not preferable.


#3

Not sure if this is useful for you, but i found a way to do slice with substr, see this post: