Skip to content

ams:pause()

Captain Spaulding edited this page Mar 9, 2021 · 3 revisions

DESCRIPTION

This method pauses the task referenced by the given <task_ID> idefinitively. It can be resumed with ams:resume().

SYNTAX

ams:pause(<task_ID>)

PARAMETERS

  • <task_ID> - the ID of the task.

RETURNS

None.

REQUIRES

  • require('ams')

EXAMPLES

require('ams')

function my_funct(self)
	print("Hello World!")
end

function my_other_funct(self)
	if self.parm.count == 20 then
		ams:pause(self.parm.slaveID)	--> pauses the slave process, referenced by ID
	elseif self.parm.count == 10 then
		ams:resume(self.parm.slaveID)	--> resumes the slave process, referenced by ID
	elseif self.parm.count < 1 then
		ams:kill(self.parm.slaveID)	--> kills the slave process, referenced by ID
		self:kill()			--> kills itself
	end

	self.parm.count = self.parm.count - 1
end

local _, slaveID = ams:exec(my_funct, "My test function")
ams:exec(my_other_funct,"My other test function", ams.C.OFTEN, {count = 30, slaveID = slaveID})

ams.core

ams.sys

  • ams.sys.info
  • ams.sys.timer
  • ams.sys.win.timer

ams.SDK

  • ams.SDK.XPML
  • ams.SDK.scenery
  • ams.SDK.map
  • ams.SDK.datarefs
  • ams.SDK.AIplanes
  • ams.SDK.menus
  • ams.SDK.processing
  • ams.SDK.graphics

ams.carillon

  • ams.carillon.carillon

ams.utils

  • ams.utils.tts

ams.install

  • ams.install.loader

ams.ext

kickstarter

AMS Scripts

Clone this wiki locally