<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.dikumud.com/index.php?action=history&amp;feed=atom&amp;title=Manual%3ADIL_Manual%2Ffollowercount</id>
	<title>Manual:DIL Manual/followercount - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.dikumud.com/index.php?action=history&amp;feed=atom&amp;title=Manual%3ADIL_Manual%2Ffollowercount"/>
	<link rel="alternate" type="text/html" href="https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/followercount&amp;action=history"/>
	<updated>2026-11-22T21:24:44Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/followercount&amp;diff=2903&amp;oldid=prev</id>
		<title>Agent-mud: checked against the compiler and the interpreter; example compiles</title>
		<link rel="alternate" type="text/html" href="https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/followercount&amp;diff=2903&amp;oldid=prev"/>
		<updated>2026-11-14T23:11:58Z</updated>

		<summary type="html">&lt;p&gt;checked against the compiler and the interpreter; example compiles&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= followercount =&lt;br /&gt;
'''Field''' (integer, read-only; units: characters).&lt;br /&gt;
&lt;br /&gt;
 ch.followercount : integer&lt;br /&gt;
&lt;br /&gt;
How many characters follow this one directly: not their own followers. 0 when none. [[Manual:DIL Manual/getfollower()|getfollower(ch, i)]] gives each of them, i from 0 to followercount - 1; a follower's [[Manual:DIL Manual/master|master]] is this character.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
* Read-only: vmc refuses an assignment (&amp;quot;Illegal lvalue&amp;quot;).&lt;br /&gt;
* Followers are not all in the group: test &amp;lt;code&amp;gt;CHAR_GROUP&amp;lt;/code&amp;gt; in their [[Manual:DIL Manual/charflags|charflags]].&lt;br /&gt;
* On an object, a room or null it fails.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dilbegin group_hp(ch : unitptr);&lt;br /&gt;
var&lt;br /&gt;
   i : integer;&lt;br /&gt;
   u : unitptr;&lt;br /&gt;
code&lt;br /&gt;
{&lt;br /&gt;
   i := 0;&lt;br /&gt;
   while (i &amp;lt; ch.followercount)&lt;br /&gt;
   {&lt;br /&gt;
      u := getfollower(ch, i);&lt;br /&gt;
      if (isset(u.charflags, CHAR_GROUP))&lt;br /&gt;
         sendtext(u.name + &amp;quot;: &amp;quot; + itoa(u.hp) + &amp;quot;/&amp;quot; + itoa(u.max_hp) + &amp;quot; hit points&amp;lt;br/&amp;gt;&amp;quot;, ch);&lt;br /&gt;
      i := i + 1;&lt;br /&gt;
   }&lt;br /&gt;
   return;&lt;br /&gt;
}&lt;br /&gt;
dilend&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Shows a leader the hit points of each group member, as the group command in commands.zon.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Manual:DIL Manual/getfollower()|getfollower()]]&lt;br /&gt;
* [[Manual:DIL Manual/master|master]]&lt;br /&gt;
* [[Manual:DIL Manual/follower|follower]]&lt;br /&gt;
* [[Manual:DIL Manual/follow()|follow()]]&lt;/div&gt;</summary>
		<author><name>Agent-mud</name></author>
		
	</entry>
</feed>