I've already checked if the value of the variable was really the one I wanted with a show message (it was).
Thanks!
# ===================================================================
#
# Script: MaskPictureFix
#
# $$COPYRIGHT$$
#
# ===================================================================
class Component_MaskPictureFix extends gs.Component_CommandInterpreter
###*
* Executes a masking-effect on a game object..
*
* @method maskObject
* @param {gs.Object_Base} object - The game object to execute a masking-effect on.
* @param {Object} A params object containing additional info.
###
maskObject: (object, params) ->
easing = gs.Easings.fromObject(params.easing)
if params.mask.type == 0
object.mask.type = 0
object.mask.ox = @numberValueOf(params.mask.ox)
object.mask.oy = @numberValueOf(params.mask.oy)
if object.mask.source?.videoElement?
object.mask.source.pause()
if params.mask.sourceType == 0
object.mask.source = ResourceManager.getBitmap("Graphics/Masks/#{params.mask.graphic?.name}")
else
object.mask.source = ResourceManager.getVideo("Movies/#{params.mask.video?.name}")
if object.mask.source
object.mask.source.play()
object.mask.source.loop = yes
else
duration = @durationValueOf(params.duration)
mask = Object.flatCopy(params.mask)
mask.value = @numberValueOf(mask.value)
object.animator.maskTo(mask, duration, easing)
if params.waitForCompletion and not (duration == 0 or @isInstantSkip())
@isWaiting = yes
@waitCounter = duration
gs.Component_CommandInterpreter = Component_MaskPictureFixThis thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.