Skip to content

Real-time change to Follow Group Array #141

Closed Answered by GitWob
GitWob asked this question in Question / Help Wanted
Discussion options

You must be logged in to vote

Hello again!

I am back to describe how I've made it work for real.
Going back to my example of Aloe and Vera,

// Make the new Aloe character and add it to the scene.
Aloe temporaryNewAloe = (Aloe)aloeScene.Instantiate();
GetParent().AddChild(temporaryNewAloe);

// Remove old Aloe from the follow group, then queue it for deletion.
phantomCam.Call("erase_follow_group_node", aloe.GetNode<RigidBody2D>("Head"));
aloe.QueueFree();

// Set our Aloe reference to the new Aloe.
aloe = temporaryNewAloe;

// Put in the New Aloe in the follow group.
phantomCam.Call("append_follow_group_node", aloe.GetNode<RigidBody2D>("Head"));

So I just needed to base my design more around the intended design of the …

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
4 replies
@ramokz
Comment options

@GitWob
Comment options

@ramokz
Comment options

@GitWob
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by GitWob
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants