|
|
Quellcode |
1 2 |
tween(hotspot[cover].ox, -200, 2, easeInOutQuad); tween(hotspot[cover].scale, get(new_scale), 2, easeInOutQuad); |
|
|
Quellcode |
1 |
tween(hotspot[cover].scale|hotspot[cover].ox, get(new_scale)|-200, 2, easeInOutQuad); |
calc(new_scale+'|-200')
Zitat
Multiple variable support: It is possible to tween several variables together at once. Therefore specify several variables, values and tweentypes separated by | characters.
variable:
Use the | character to specify several variables.
value
Use the | character to specify several values for several variables.
Note - to tween to the value of another variable use the get() action to get the value of the other variable!
did you test if your variable is really ok?
Certainly. And notice, it works fine when the two tweens are executed separately. It is only when they are combined that it fails.
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »indexofrefraction« (5. Juni 2017, 10:17)
ps if you're in the mood of testing you could try this:
set(variable,50);
testaction(get(variable)|-200);
then in testaction: trace(%1); and maybe trace("%1");
ps if you're in the mood of testing you could try this:
set(variable,50);
testaction(get(variable)|-200);
then in testaction: trace(%1); and maybe trace("%1");
Not sure where this was going but tried it anyway. %1 and "%1" resolve to: get(variable)|-200
Now, if you use a comma instead of a pipe: testaction(get(variable),-200);, %1 resolves to: 50 which is expected.
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »indexofrefraction« (6. Juni 2017, 11:00)
That works as intended, the special get() and calc() functions are resolving the given parameters/values before passing them to the action, but they work only on the whole parameter.dunno if this is a bug or intended, but i guess the latter. this only klaus can tell.
|
|
Quellcode |
1 |
actionname( get(...anything...), calc(...anything...) ); |
|
|
Quellcode |
1 |
tween(hotspot[cover].scale|hotspot[cover].ox, get(new_scale)|-200, 2, easeInOutQuad); |
|
|
Quellcode |
1 |
tween(hotspot[cover].scale|hotspot[cover].ox, calc(new_scale + '|-200'), 2, easeInOutQuad); |
would be e.g. this one:
![]()
Quellcode
1 tween(hotspot[cover].scale|hotspot[cover].ox, calc(new_scale + '|-200'), 2, easeInOutQuad);
The calc function first automatically resolves 'new_scale' to its value and than adds the string '|-200' and then passes that to the tween action.