What does SetBase() do?

Discussions about Coding and Scripting
Post Reply
User avatar
Posts: 1830
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

What does SetBase() do?

Post by Barbie » 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
  1. wiki.beyondunreal.com: Actor Bases
  2. 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

User avatar
Posts: 4533
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: What does SetBase() do?

Post by sektor2111 » Sun Dec 11, 2016 7:22 am

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 :loool: 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.

Post Reply