Aller au contenu

Photo

Making PC A Non Party Follower


  • Veuillez vous connecter pour répondre
5 réponses à ce sujet

#1
Challseus

Challseus
  • Members
  • 1 032 messages
Hello all.

So, I'm having a little issue with making the PC a non party follower, per the function, AddNonPartyFollower. The function is pretty straightforward, and I've been using it on other creatures with absolutely no issues. Here's what I'm doing:

  • Set the party leader to another non-PC party member, via the function, SetPartyLeader.
  • Next, I am removing the PC from the party. Now, it's important to note that I am not using the standard function, UT_FireFollower. I've gutted out what I needed in it, and I am simply calling the meat of the function, SetFollowerState, with the parameter: FOLLOWER_STATE_INVALID.  The reasoning was, there was a bunch of stuff in there that wasn't need, most of all, the setting of the party members script to RESOURCE_SCRIPT_CREATURE_CORE, when I am already overriding that script with my own. Plus, for other party members, if I don't set the state to FOLLOWER_STATE_INVALID, they won't follow the PC if I make them a non party follower. Anyway, the point is, my remove party member function works just fine for what I'm doing in my game.
  • Finally, I am calling the function to add the PC as a follower, but they don't follow me around as they should.
Now, the above works perfectly fine with other party members, so I know it's not an error in the logic (well, for the most part!). I can only think of a few things going on:

  • You just can't do this for the PC. Fair enough...
  • If you look at the documentation for EnablevEvent, it clearly states that by default, all events are enabled for NPC's, but not for PC's. I already use this function to catch certain events for the PC in my custom player core script, and I was thinking that perhaps there is some event I need to be catching in order for this work?
If all else fails, does anyone know of a function I can call to simply make a creature follow another creature? Preferably not calling some ActionMoveToObject function every second Posted Image

#2
TimelordDC

TimelordDC
  • Members
  • 923 messages
AddNonPartyFollower adds the creature to the party pool but not active party list, right? So, the player would never be able to select the 'player character' even if that function worked correctly.



In that case, since RoE starts out with a custom player character, couldn't you just create another creature with the same characteristics as your player character and use that creature as a summons to follow the party around when the player character is not the leader? You would still have to do some work to carry over the equipped items but that's about it, I think.



If you have specific combat situations where you expect the 'follower PC' to use some of his custom abilities (Last Resort, Unison, etc.), you would probably need to capture the game change event and substitute the original PC instead of the summoned one (though I am still doubtful whether this last part is doable)



The above suggestion is because I don't think you can add the actual PC using this.

#3
Challseus

Challseus
  • Members
  • 1 032 messages

TimelordDC wrote...

AddNonPartyFollower adds the creature to the party pool but not active party list, right? So, the player would never be able to select the 'player character' even if that function worked correctly.

In that case, since RoE starts out with a custom player character, couldn't you just create another creature with the same characteristics as your player character and use that creature as a summons to follow the party around when the player character is not the leader? You would still have to do some work to carry over the equipped items but that's about it, I think.

If you have specific combat situations where you expect the 'follower PC' to use some of his custom abilities (Last Resort, Unison, etc.), you would probably need to capture the game change event and substitute the original PC instead of the summoned one (though I am still doubtful whether this last part is doable)

The above suggestion is because I don't think you can add the actual PC using this.


That's too bad about not being able to add the PC as a follower. In the end, I just added a condition in the heartbeat script to check to see if the PC is in the appropriate state, and if so, follow the party leader. For my purposes, I just need them to follow the leader. They don't have to worry about using Last Resorts, Unison Abilities, or well, anything having to do with combat. Just follow and be quiet Posted Image

Anyway, thanks for the help!

Modifié par Challseus, 14 juin 2010 - 01:09 .


#4
Craig Graff

Craig Graff
  • Members
  • 608 messages
Did you try SetFollowPartyLeader?

#5
Challseus

Challseus
  • Members
  • 1 032 messages

Craig Graff wrote...

Did you try SetFollowPartyLeader?


It's funny you say that, because I found out late last night that SetPartyLeader wasn't implicitly called when the PC was being removed from the party. I just assumed it would happen. Anyway, I added code to promote the next party member in line to party leader if such a thing happens. So, calling SetFollowPartyLeader on the PC after that may fix all fo this for me.

Thanks!

#6
Challseus

Challseus
  • Members
  • 1 032 messages

Challseus wrote...

Craig Graff wrote...

Did you try SetFollowPartyLeader?


It's funny you say that, because I found out late last night that SetPartyLeader wasn't implicitly called when the PC was being removed from the party. I just assumed it would happen. Anyway, I added code to promote the next party member in line to party leader if such a thing happens. So, calling SetFollowPartyLeader on the PC after that may fix all fo this for me.

Thanks!


Just tried it out. No dice... Thanks anyway.