Discussions about Coding and Scripting
- Posts: 1752
- Joined: Fri Sep 25, 2015 9:01 pm
- Location: moved without proper hashing
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
- 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?)
Are any other details known?
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
- Posts: 4262
- Joined: Sun May 09, 2010 6:15 pm
- Location: On the roof.
Q: What does SetBase() do?
A: Ask a LiftCenter and an AttachMover and MonsterEnd from some MH map where older MH2 did not work and... What's the problem with SetBase ?
Yes, lousy coded MH versions did not include in tweak MonsterEnd triggers with a Base so we had map "fixed" later, in fact MH was a problem and Not map - MH-Miam ? Already described in MH2V3 code
but no one "coder" is reading.
Like I said 1000 times - FIX YOUR MH2 mods ( because in my MH2 - MH-Miam and all those things are perfectly operational - Bad End from MH-LostSouls included because that is not a happy end).
MHBotyMan4 reports RouteCache correctly because they do track NavPoints involved with their BASES included regarding to LiftCenter stupid 0 net code.