Addfollower¶
Add the caller as a follower to a new entity or add a new one via an AnimID or a flagvar slot containing it.
Syntax¶
(1)
|addfollower,this|
(2)
|addfollower,this,true|
(3)
|addfollower,follower|
(4)
|addfollower,var,flagvar|
Parameters¶
follower
: int¶
The follower's AnimID to add. This must be a valid AnimID or an exception will be thrown.
var
¶
The presence of this parameter indicates to operate in syntax (4). Any other value will be interpreted as follower
which may cause an exception to be thrown.
flagvar
: int¶
The flagvar slot containing the follower's AnimID to add. This must be a valid flagvar slot or an exception will be thrown.
this
¶
The presence of this parameter indicate to operate in syntax (1) or (2) which adds the caller to the follower by replacing its entity entry in the process. Any other value will be interpreted as follower
which may cause an exception to be thrown.
true
¶
Indicate to operate in syntax (2) which, after the caller is added as follower, will shrink the textbox, start to move the party and followers into their regular formation and grow the textbox again. Any other value is the same as not sending the parameter which will not do these additional steps.
Remarks¶
The way followers work is there are 3 lists/arrays involved:
extrafollowers
: The list saved on the Save File that dictates which followers to consider following the last member of the party.map.canfollowID
: An array generated on a map'sStart
(specificallyAreaSpecific
) that acts as a whitelist toextrafollowers
. This whitelist enforces who can follow the party on the first iteration of the map'sLateUpdate
. The TestRoom is however exempt from this.map.tempfollowers
: The list of non party followers currently following the party. This represents all the non party active followers.
Adding a follower is done in 2 ways:
- Adding from an existing entity: This is what syntax (3) and (4) does. How it works is it destroys the caller's entity, but creates it back this time following the last member of the follower chain (in the order player, party members and existing
map.tempfollowers
). This also adds the follower toextrafollowers
andmap.tempfollowers
. which makes the follower active immediately. - Adding from AnimID: This is what syntax (1) and (2) does. All this do is add the AnimID to
extrafollowers
, but nothing else. This means the follower isn't going to be active until a map load is performed which implies the whitelisting ofmap.canfollowID
needs to allow the follower. This is only used for troubleshooting purposes in the TestRoom.