/*	AVAILABLE DATA
	thisCommand_obj
		data						This command's data
		run()						This function
		nextEvent()			Function that triggers the next sibling command
		storeTimeout()	Function that stores this command's timeout ID   (used to stop the script)
			var waitId = setTimeout( parentScript.nextEvent, thisCommand_obj.data.value*1000 );
			thisCommand_obj.storeTimeout( waitId );
*/
// run()
define_pause = function( thisCommand_obj ){

	
	var setName = thisCommand_obj.data.system;
	var isPaused = thisCommand_obj.data.isPaused;
	
	if(TRACE_SCRIPT  ||  TRACE_SCRIPT_PAUSE)
		trace("pause: "+setName);
	
	LOOP.pauseSet( setName, isPaused );
	
	if(TRACE_SCRIPT  ||  TRACE_SCRIPT_PAUSE)
		trace("pause result:  " + LOOP.isPaused( setName )  +  "  ("+setName+")"  );
	
	
	// instantly done
	// return VOW.make().keep();
	
	// wait 1 frame for sprites to react to pause,  then continue
	var vow = VOW.make();
	setTimeout(function(){
		vow.keep();
	}, 34);
	return vow.promise;
	
	
}// define_pause()