Hi.

My goal is
1) There is 2 scene "Town" and "Field".
2) Here is NPC "Tom" Standing in Town
3) Player Can invite "Tom". "Tom" become following NPC (Just like Blue Pants on Tutorial)
4) Player Can Talk "Tom" following Player
5) Player Can Leave "Tom" from Active Group with Talking
6) Player Can Re-Invite left "Tom" to Active Group with Talking
7) Left "Tom" Moves to Town.
8) Player Can invite "Tom" again. "Tom" keeps his level


My Solution is:
1) "Combatant->Active Group->Join Active Group" with "Use Game Object" in Talk Event of "Tom" in Town.
2) "Combatant->Active Group->Leave Active Group" with "Use Game Object" in Talk Event of "Tom" following.
3) "Combatant->Active Group->Join Active Group" with "Use Game Object" in Talk Event "Tom" following.
4) In Town Scene StartUp. if Tom is not in Group. Spawn "Tom" with "Combatant->Spawn Combatant" (Maybe it is wrong?)

Result is:
a) Talk "Tom" in Town. Talk an Invite as 1st invite -> works fine.
b) Some Battle in Field. Tom is leveled up.
c) Talk "Tom" in Field. Talk as leave -> works fine.
d) Talk "Tom" in Field. Talk as invite again -> works fine.
e) Move to Town and Talk "Tom" in Town for invite -> Levels are Initialized.

How do I Spawn "Tom" keeping his Level?

or any other good solution?

thx.
  • Well, the tom back in town is a brand new combatant.

    Instead of spawning a combatant, you could use a 'regular' NPC without a combatant and use an interaction to join Tom's combatant to the group (i.e. a defined combatant instead of one from a game object).

    When a combatant leaves the group, it'll still be kept as an inactive member. When joining a combatant, you have the option to Use Inactive, i.e. you can use an inactive combatant (if one of the same kind is available) and join it back to the group, keeping it's status, equipment, etc. intact.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Thx I will try it.
    and One more Question.
    when non Combatant Tom(Called "DummyTom") intaract event executed,
    I think I have to Destroy DummyTom and move new Joind "Tom" to DummyTom's position and rotations.

    how can I access joined Commbatant in event node "Change Position"?
    or last index of active group is always knows new joined convatant?
    (if it is true, I can move Tom in script)

    Thx.
  • You have to add a Member type actor to have access to player group members.

    Alternatively, you could shortly fade the screen to black, spawn the player group members (Spawn Group Members node), destroy the dummy tom and fade in the screen again :)
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.