Difference between revisions of "GetNumFollowers"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>DragoonWraith
(not a record variable function)
imported>TheNiceOne
 
(One intermediate revision by one other user not shown)
Line 4: Line 4:
  (numFollowers:short) [''ref.'']GetNumFollowers
  (numFollowers:short) [''ref.'']GetNumFollowers
Returns the number of actors currently following the calling actor. Summoned creatures are excluded.
Returns the number of actors currently following the calling actor. Summoned creatures are excluded.
==Example==
<pre>
; Walk through each follower and print reference to console
set numAllies to player.GetNumFollowers
While numAllies > 0
let numAllies -= 1
set tempRef to player.GetNthFollower numAllies
PrintC "Follower: %n" tempRef
Loop
</pre>
==Notes==
* Companions engaged in combat are still classed as followers.


==See Also==
==See Also==

Latest revision as of 03:45, 11 March 2011

A command for Oblivion Script Extender

Syntax:

(numFollowers:short) [ref.]GetNumFollowers

Returns the number of actors currently following the calling actor. Summoned creatures are excluded.

Example[edit | edit source]

; Walk through each follower and print reference to console

set numAllies to player.GetNumFollowers
	
While numAllies > 0
	let numAllies -= 1
	set tempRef to player.GetNthFollower numAllies
	PrintC "Follower: %n" tempRef
Loop	

Notes[edit | edit source]

  • Companions engaged in combat are still classed as followers.

See Also[edit | edit source]