Skip to content
This repository has been archived by the owner on Dec 30, 2024. It is now read-only.

Spawning followers #66

Answered by Chasmical
Killerstrike1234 asked this question in Q&A
Sep 28, 2022 · 1 comments · 46 replies
Discussion options

You must be logged in to vote

You can use one of the SpawnerMain.SpawnAgent methods to spawn a follower.

As a custom ability it would look kind of like this:

public class FollowerSpawn : CustomAbility
{
    [RLSetup]
    public static void Setup()
    {
        RogueLibs.CreateCustomAbility<FollowerSpawn>()
            .WithName(new CustomNameInfo("Follower Spawn"))
            .WithDescription(new CustomNameInfo("A special ability that spawns followers."))
            .WithSprite(Properties.Resources.MySprite)
            .WithUnlock(new AbilityUnlock());
    }

    public override void OnAdded() { }

    public override void OnPressed()
    {
        if (!Owner.CanHaveMoreFollowers(true))
            return; // the …

Replies: 1 comment 46 replies

Comment options

You must be logged in to vote
46 replies
@Aspace2create
Comment options

@Chasmical
Comment options

@Aspace2create
Comment options

@Chasmical
Comment options

@Aspace2create
Comment options

Answer selected by Killerstrike1234
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants