Difference between revisions of "Template:Function"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>DragoonWraith
imported>DragoonWraith
Line 22: Line 22:
  <nowiki>}}</nowiki>
  <nowiki>}}</nowiki>


=Example=
= Example =


<pre>{{Function
<pre>{{Function
Line 45: Line 45:
}}</pre>
}}</pre>


=Result=
= Result =


{{Function
{{Function
Line 83: Line 83:


syntax starts here: -->
syntax starts here: -->
== Syntax ==
'''Syntax:'''
<!-- help link -->
<!-- help link -->
<div style="font-size:10px;margin-top:-3em;margin-left:6.3em;">[[Function syntax|[help]]]</div>
<div style="font-size:10px;margin-top:-3em;margin-left:6.3em;">[[Function syntax|[help]]]</div>

Revision as of 10:36, 5 August 2010



This is a WIP, feedback is appreciated. To retain readability a lot of HTML comments are used, they shouldn't impact the working of the template, but could add to the confusion a bit.

{{Function
 origin            = whether the function came from the CS itself or was added by OBSE.
                     valid values: CS1 (TES CS 1.0), CS1.1 (TES CS 1.1), CS1.2 (TES CS 1.2), OBSE
 summary           = description of the function
 name              = the name of the function. The page name is the default value.
 alias             = An abbreviated version of the function name that can be
                     used instead of the long name.
 returnVal         = what the function returns.
 returnType        = the type of the returned value.
 referenceType     = if appropriate, the type of reference that the function may be called
                     on with the dot syntax
 arguments         = List of arguments specified using the Template:FunctionArgument template,
                     or any other wiki syntax.
 example           = optionally, the function used as part of a script to serve as an example
 CategoryList      = the list of categories to which the page belongs
}}

Example

{{Function
 |origin = CS1
 |summary = Plays the visuals of the specified Magic Effect on the calling reference.
 |name = PlayMagicEffectVisuals
 |alias = pme
 |returnVal = 0, 1
 |returnType = void
 |referenceType = [Actor, Activator]
 |arguments = 
  {{FunctionArgument
   |Name = mgefID
   |Type = ref
  }}{{FunctionArgument
   |Name = duration
   |Type = short
   |Optional = y
  }}
 |example = Player.Test 3
 PlayMagicEffectVisuals FIDG 3
}}

Result

A function included in the TES CS v1.0. Syntax:

[help]
[Actor, Activator].PlayMagicEffectVisuals   
[Actor, Activator].pme  

Plays the visuals of the specified Magic Effect on the calling reference.

Example

Player.Test 3
PlayMagicEffectVisuals FIDG 3