Difference between revisions of "GetSummons"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>Kyoma
(New page: __NOTOC__ A User Function for use with Oblivion Script Extender '''Syntax:''' (summons:array) reference.Call GetSummons Returns an Array with...)
 
imported>Kyoma
m
 
Line 12: Line 12:


Getting an array with all the summons active on a reference (in this case the player)
Getting an array with all the summons active on a reference (in this case the player)
  Let aSummons := player.Call GetSummons
  Let aSummonsArray := player.Call GetSummons


==Code==
==Code==
Line 37: Line 37:
* [[GetNumSummons]]
* [[GetNumSummons]]
* [[GetNthSummon]]
* [[GetNthSummon]]
* [[GetSummoner]]
* [[IsSummon]]
[[Category: User Functions]]
[[Category: User Functions]]



Latest revision as of 06:43, 28 December 2009

A User Function for use with Oblivion Script Extender

Syntax:

(summons:array) reference.Call GetSummons 

Returns an Array with all the actors currently summoned by the calling actor.

Notes[edit | edit source]

  • This function must be called on a reference (Ref.call <function>)

Examples:[edit | edit source]

Getting an array with all the summons active on a reference (in this case the player)

Let aSummonsArray := player.Call GetSummons

Code[edit | edit source]

ScriptName GetSummons
array_var arFollowers
ref rFollower
long iFollower

Begin Function {}
	let arFollowers := GetFollowers
	let iFollower := GetNumFollowers
	While iFollower > 0
		let iFollower -= 1
		let rFollower := GetNthFollower iFollower
		ar_Erase arFollowers (ar_Find pFollower arFollowers)
	Loop

	SetFunctionValue arFollowers 
	let arFollowers := ar_Null
End 

See Also[edit | edit source]