AEmitter:IsEmitting

From Data Realms Wiki

(Difference between revisions)
Jump to: navigation, search
m (updating function page)
m (Reverted edits by Beautifybot (talk) to last revision by Thoughtprocess)
Line 1: Line 1:
{{LuaFunction
{{LuaFunction
-
|function_name =IsEmitting
+
|function_name       = self:IsEmitting
-
|arguments =* None.
+
|arguments           =
-
|returns =Whether it's emitting or not.
+
|returns             = [[Boolean]]
-
|description =
+
|description         = Checks whether emissions ([[AddEmission]]) are activated or not. Useful for rockets/missiles that are supposed to have a short thrust-time.
-
Indicates whether this AEmitter is currently enabled and emitting.
+
|codedesc             = Checks whether emission is activated. If it isn't, it enables emission.
-
|codedesc = Checks whether emission is activated. If it isn't, it enables emission.
+
|code                 = <code lua n>
-
|code = <code lua n>
+
function Update(self)
function Update(self)
if self:IsEmitting() == false then
if self:IsEmitting() == false then
Line 13: Line 12:
end
end
</code>
</code>
-
|output = [[nil]]
+
|output               = [[nil]]
-
}}
+
|}}

Revision as of 00:23, 28 June 2012

Function
Syntaxself:IsEmitting( )
Description:
Checks whether emissions (AddEmission) are activated or not. Useful for rockets/missiles that are supposed to have a short thrust-time.
ReturnsBoolean




Example
DescriptionChecks whether emission is activated. If 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