tween_set

Syntax:

tween_set(target_object, vars);
Argument name Type Description
target_object Object | instance | array of objects or instances or mixed Target object whose properties should be affected. The target can be any game maker object. You can also pass an array of objects or instances.
vars array The special vars array. For more info about the vars array see the Animation documentation.

Returns: (Tween) The newly created tween instance

Description:

Immediately sets properties of the target accordingly - essentially a zero-duration tween_from with a more intuitive name.

Example:

tween_set(obj_clown, ["x", 20, "y", mouse_y, "alpha", random(1), "image_angle", 45, "foo", 24.5]);

// This code does the same as:

obj_clown.x = 20;
obj_clown.y = mouse_y;
obj_clown.alpha = random(1);
obj_clown.image_angle = 45;
obj_clown.foo = 24.5;