What does SetBase() do?
Posted: Sun Dec 11, 2016 1:32 am
After I moved the replacement code for "MonsterHunt.MonsterEnd" from the base Mutator's PostBeginPlay() into its state code, I noticed that my NewMonsterEnd's attached to a mover do not move anymore. Because I did not find any stock UC script code concerning "AttachTag" in this matter there must be some invisible action done by the engine.
My solution: If I pick the first Actor (lets call it "MHEndMover") with its tag equal to NewMonsterEnd's AttachTag and call "NewMonsterEnd.SetBase(MHEndMover)", movement work for all NewMonsterEnd again. But because this is only my guess and documentation about SetBase() is rare, I'd like to know what its does in detail. For now I've found
My solution: If I pick the first Actor (lets call it "MHEndMover") with its tag equal to NewMonsterEnd's AttachTag and call "NewMonsterEnd.SetBase(MHEndMover)", movement work for all NewMonsterEnd again. But because this is only my guess and documentation about SetBase() is rare, I'd like to know what its does in detail. For now I've found
- wiki.beyondunreal.com: Actor Bases
- from stock code Actor.uc: the following events are probably risen after a call to SetBase(): OldAttachedActor.Detach( Actor Other ) and NewAttachedActor.Attach(Actor Other) (in this order?)