Small: Difference between revisions

From Eternity Wiki
Jump to navigationJump to search
mNo edit summary
(small gone)
(19 intermediate revisions by 12 users not shown)
Line 1: Line 1:
[ free real ringtones] [ jazz ringtones] [ vicodin online] [ buy zyban] [ free ericsson ringtones] [ sagem ringtones] [ cheap diazepam] [ free sharp ringtones] [ cingular ringtones] [ cheap adipex] [ verizon ringtones] [ free qwest ringtones] [ cheap clonazepam] [ zanaflex online] [ free mtv ringtones] [ mtv ringtones] [ free kyocera ringtones] [ free sony ericsson ringtones] [ tenuate online] [ real ringtones] [ cheap valium] [ cheap paxil] [ didrex online] [ sildenafil online] [ free nextel ringtones] [ midi ringtones] [ ativan online] [ xanax] [ cyclobenzaprine online] [ order lorazepam] [ free alltel ringtones] [ didrex online] [ mp3 ringtones] [ cingular ringtones] [ tracfone ringtones] [ buy xanax] [ free tracfone ringtones] [ cheap norco] [ fioricet online] [ lorazepam online] [ free free ringtones] [ cheap viagra] [ free wwe ringtones] [ buy xanax] [ zoloft online] [ free ringtones] [ cheap sildenafil] [ cheap xenical] [ free samsung ringtones] [ cheap prozac] [ buy ultracet] [ norco online] [ but lipitor] [ free motorola ringtones] [ sagem ringtones] [ meridia online] [ but hydrocodone] [ diazepam online] [ ativan online] [ norco online] [ cheap prozac] [ sonyericsson ringtones] [ free qwest ringtones] [ lisinopril online] [ cheap didrex] [ cheap ultram] [ cialis] [ alprazolam online] [ nextel ringtones] [ cool ringtones] [ cheap lortab] [ free nextel ringtones] [ zyban online] [ cheap pharmacy online] [ xanax online] [ ativan] [ sprint ringtones] [ cheap ativan] [ free sprint ringtones] [ cheap wellbutrin] [ zanaflex online] [ buy carisoprodol] [ cheap propecia] [ buy prozac] [ valium online] [ cheap xanax] [ motorola ringtones] [ but ortho] [ cheap wellbutrin] [ levitra online] [ fioricet] [ samsung ringtones] [ ortho online] [ cool ringtones] [ cheap lorazepam] [ celexa online] [ tramadol online] [ free polyphonic ringtones] [ zanaflex online] [ nokia ringtones] [ cheap ortho] [ free samsung ringtones] [ soma online] [ lorazepam online] [ free sagem ringtones] [ free sprint ringtones] [ lipitor online] [ free mp3 ringtones] [ free sprint ringtones] [ vigrx online] [ free polyphonic ringtones] [ cheap lisinopril] [ free mp3 ringtones] [ cheap viagra] [ cingular ringtones] [ cheap tenuate] [ free kyocera ringtones] [ qwest ringtones] [ norco online] [ clonazepam online] [ sildenafil online] [ nextel ringtones] [ funny ringtones] [ but cialis] [ cheap ultracet] [ free sprint ringtones] [ diazepam online] [ free free ringtones] [ free samsung ringtones] [ free ringtones] [ hydrocodone online] [ tramadol online] [ cheap ambien] [ mtv ringtones] [ free motorola ringtones] [ free funny ringtones] [ music ringtones] [ free cool ringtones] [ cheap fioricet] [ real ringtones] [ lorazepam] [ cheap soma] [ clomid online] [ but clonazepam] [ paxil online] [ cheap lisinopril] [ free samsung ringtones] [ free sonyericsson ringtones] [ cheap phentermine] [ alltel ringtones] [ sprint ringtones] [ clonazepam online] [ buy didrex] [ cheap ultram] [ free verizon ringtones] [ celexa online] [ cheap norco] [ diethylpropion online] [ tenuate online] [ verizon ringtones] [ lipitor online] [ diazepam online] [ verizon ringtones] [ cheap adipex] [ meridia online] [ samsung ringtones] [ free cingular ringtones] [ clomid online] [ lisinopril online] [ cheap carisoprodol] [ paxil online] [ ericsson ringtones] [ free mono ringtones] [ cheap albuterol] [ ericsson ringtones] [ ambien online] [ cheap levitra] [ cheap didrex] [ midi ringtones] [ cheap clomid] [ cheap lipitor] [ sagem ringtones] [ meridia online] [ free sony ringtones] [ valium online] [ order clomid] [ hoodia] [ free music ringtones] [ hydrocodone] [ but adipex] [ cheap hgh] [ hgh online] [ levitra online] [ tracfone ringtones] [ free sony ringtones] [ order propecia] [ cheap vicodin] [ soma online] [ verizon ringtones] [ buy meridia] '''Small''' is a scripting language created by ITB CompuPhase; it uses a [[Wikipedia:C programming language|C]]-like syntax and is [[Eternity]]'s main scripting language, replacing the [[Fragglescript]] of earlier versions. To be used in Eternity, the script files must first be compiled using the <tt>sc</tt> executable. Script files usually have the extension <tt>.sma</tt>, but files of any extension can be compiled. Assuming the script has no errors, the compiler should output an <tt>.amx</tt> file, which can be loaded into a [[Doom wiki:WAD|WAD]] for use with Eternity.  
Small used to be a scripting engine available for Eternity. It had to be removed because of lack of compatibility with 64-bit systems. Currently you can use [[ACS]] scripting instead.
== Script types ==
There are two types of script: gamescript and levelscript. Gamescripts work over a whole gaming session, while levelscripts only work on maps which have specified that script in their level info. To use a script file as a gamescript, the compiled script file should be loaded into a WAD and given the lump name <tt>GAMESCR</tt>. These gamescript files will work over every level.
Levelscripts are loaded using a different method. To specify a script for use in a single map, <tt>levelscript=MYSCRIPT</tt> should be added to the map's [[MapInfo]]. Here, <tt>MYSCRIPT</tt> should be replaced with your script's lump name, which can be anything.
== Triggering scripts ==
There are many ways to start a script. They can be triggered by a linedef, the start of a map, or a codepointer specified on a Thing.
=== Triggering via linedef ===
The most common way is to start a script when a linedef is triggered. To do this, first give the linedef you want to trigger the script a <tt>Start</tt> script action (linedef actions 273-280) and a unique tag number. For example, if we want our script to start when the player walks over a linedef, use linedef action 280 and give the linedef a tag of 1. The script would then look like this:
  public Script1()
      _Printf( _MSG_NORMAL, "Hello World");
Note that the Script## number is the same as the linedef's tag. Compile your script and set up the wad as explained above. Assuming all things have been set up properly, when you walk over that linedef, it will output "Hello World" to the screen.
=== Triggering on map start ===
Another way of starting a script is using the <tt>OnInit()</tt> function.
  public OnInit()
      _Printf( _MSG_NORMAL, "Hello World");
This script will output "Hello World" when the map starts up. This could be useful for starting a series of callbacks for animating HUD sprites or raising/lowering sectors.
=== Triggering by Thing codepointer ===
The final way is to use the StartScript codepointer on a Thing's frame. The StartScript codepointer uses the first two args to decide the script number to execute and the script type (whether it is levelscript or gamescript). For example, the [[EDF]] file to do this is:
      name = S_TROO_DIE1    // Frame we want to start the script on
      action = StartScript  // The startscript codepointer
      args = {1,0}          // Codepointer's arguments, starts script 1 and sets the type to game (0)
Load the EDF with your map and script, and whenever you kill an imp (therefore going onto the frame S_TROO_DIE1, it will run script 1, outputting "Hello World". As this script is a gamescript, it will do this on every map.

Latest revision as of 17:03, 7 August 2013

Small used to be a scripting engine available for Eternity. It had to be removed because of lack of compatibility with 64-bit systems. Currently you can use ACS scripting instead.