AEmitter:EnableEmission

From Data Realms Wiki

(Difference between revisions)
Jump to: navigation, search
m (refresh cache)
m (updating function page)
Line 1: Line 1:
{{LuaFunction
{{LuaFunction
-
|function_name       = EnableEmission
+
|function_name =EnableEmission
-
|arguments           = [[Boolean]]
+
|arguments =* Whether to enable or disable emission.
-
|returns             = [[nil]]
+
|returns =None.
-
|description         = Toggles  whether emissions ([[AddEmission]]) are activated or not. Useful for rockets/missiles that are supposed to have a short thrust-time.
+
|description =
-
|codedesc             = Checks whether emission is activated. When it isn't, it enables emission.
+
Sets this AEmitter to start emitting at the set rate, or to stop.
-
|code                 = <code lua n>
+
|codedesc = Checks whether emission is activated. When it isn't, it enables emission.
 +
|code = <code lua n>
function Update(self)
function Update(self)
if self:IsEmitting() == false then
if self:IsEmitting() == false then
Line 12: Line 13:
end
end
</code>
</code>
-
|output               = [[nil]]
+
|output = [[nil]]
-
|}}
+
}}

Revision as of 00:11, 28 June 2012

Function
SyntaxEnableEmission( * Whether to enable or disable emission. )
Description:
Sets this AEmitter to start emitting at the set rate, or to stop.
ReturnsNone.




Example
DescriptionChecks whether emission is activated. When it isn't, it enables emission.
Code
  1. function Update(self)
  2.         if self:IsEmitting() == false then
  3.                 self:EnableEmission(true);
  4.         end
  5. end
Outputnil
Personal tools