Flags will have a pretty important role in my contest map, so I am desperate!
Thanks in advance!

Code: Select all
class Flag1 extends Decoration;
...
function PostBeginPlay() {
Super.PostBeginPlay();
LoopAnim('Wave',0.7,0.1);
}
Code: Select all
//=============================================================================
// MyFlag1.
//=============================================================================
class MyFlag1 expands Flag1;
function PostBeginPlay() {
Super.PostBeginPlay();
LoopAnim('Wave',0.1,0.1);
}
Code: Select all
class MyFlag1 expands Flag1;
function PostBeginPlay() {
Super(Decoration).PostBeginPlay(); //get over useless parent
LoopAnim('Wave',0.1,0.1);
}
For me it is a rule to call parent's functions (unless something really unwanted happens there), even if I know that it could have been left out. Why? Imagine someone has changed parent's or parent parent's functions code... Furthermore I don't have to look up what happens in the chain of superordinated functions to decide if a call could be left out.sektor2111 wrote:Why calling parent animation if is not needed ?
Do not bring in apples where pears have to be. In the Humane.u package the code is duplicated, executed and also parent's original code is executed. This is absurd has nothing to do with calling parent's function.sektor2111 wrote:Like that Humane package having duplicate call to weapon and monster spawning two weapons
I don't know that.sektor2111 wrote:the Evil Queen teleporting case
With some exceptions I usually always do that, even if I know at that moment that no code will be executed there. But if I rework the code (I don't mean UScript necessarily) years later, I may change parent's code and then wonder and spend a lot time searching why sub class objects do not react as expected.sektor2111 wrote:Do you really think that calling parent is always a good practice ?
The function is defined exactly there - I think you mean the function is empty. Calling a not defined function will cause a runtime error or not even compile. Again this may sound like hair splitting with words, but using the correct words is important especially in this medium where we only have words to communicate.sektor2111 wrote:Actor class which probably has a null PostBeginPlay - is not even defined