Difference between revisions of "GetEsp"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>Haama
m (Standardized)
imported>Quetzilla
m
 
(4 intermediate revisions by one other user not shown)
Line 1: Line 1:
__NOTOC__
__NOTOC__


{{Beta}}
A command for [[:Category:Pluggy|Pluggy]]
A command for [[:Category:Pluggy|Pluggy]]


'''Syntax:'''
'''Syntax:'''
  (EspID:long) GetEsp ''"EspFilename:string"''
  (EspID:long) GetEsp ''"EspFilename:string" StringID:long''


Returns the Pluggy internal EspID corresponding an active esp or esm file.
Returns the Pluggy internal EspID corresponding an active esp or esm file.
*May be used with either a string constant or StringID.  If a StringID is specified it overrides the string constant.
**If using a StringID, a blank string constant must still be supplied.  Note that '''""''' will not be accepted by the compiler, instead use a blank space: '''" "'''.
*It returns -1 if the esp is not active.
*It returns -1 if the esp is not active.
*If no EspFilename is specified, GetEsp returns the EspID of the calling esp (of the script).
*If no EspFilename or StringID is specified, GetEsp returns the EspID of the calling esp (of the script).


'''Example:'''
'''Example:'''
  long EspID
  long EspID
  set EspID to (GetEsp "Alchemical Formulas.esm"
  set EspID to (GetEsp "Alchemical Formulas.esm")
If ''Alchemical Formulas.esm'' is the second loaded mod, EspID will be set to 1.
If ''Alchemical Formulas.esm'' is the second loaded mod, EspID will be set to 1.
  long EspID
  long EspID
Line 19: Line 20:
If called from a script of ''Alchemical Formulas.esm'' (and it's the second loaded mod) EspID will be set to 1.
If called from a script of ''Alchemical Formulas.esm'' (and it's the second loaded mod) EspID will be set to 1.


[[Category: Pluggy]]
[[Category: Functions (Pluggy)]]

Latest revision as of 06:41, 10 August 2008


A command for Pluggy

Syntax:

(EspID:long) GetEsp "EspFilename:string" StringID:long

Returns the Pluggy internal EspID corresponding an active esp or esm file.

  • May be used with either a string constant or StringID. If a StringID is specified it overrides the string constant.
    • If using a StringID, a blank string constant must still be supplied. Note that "" will not be accepted by the compiler, instead use a blank space: " ".
  • It returns -1 if the esp is not active.
  • If no EspFilename or StringID is specified, GetEsp returns the EspID of the calling esp (of the script).

Example:

long EspID
set EspID to (GetEsp "Alchemical Formulas.esm")

If Alchemical Formulas.esm is the second loaded mod, EspID will be set to 1.

long EspID
set EspID to GetEsp

If called from a script of Alchemical Formulas.esm (and it's the second loaded mod) EspID will be set to 1.