Level Post Begin play ?

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

PTGui

New Member
Mar 7, 2006
31
0
0
I want to make it possible for just after the level starts, be able to run a function. For example, to make it possible for something be visible or not using a random factor, but this made for all objects (so it can't be a localy done on objects in their's PostBeginPlay() )

so, is there a like a "PostBeginPlay" for levels, after all objects are load and just before the player is on game?

If so, where? Should I use a GameInfo object for this, with the event PostLogin, or is there a better solution?
 
Last edited:

PTGui

New Member
Mar 7, 2006
31
0
0
Thankx... I've been looking for that for a while now, and it was a great help. :clap:

I've also read the discussion there and I found this?

FoxPaw said:
... Also, do the actors "exist" in InitGame? That is, if there is an actor on the map, can I find it with AllActors in InitGame?

Wormbo said:
Map actors exist during initialization, they just didn't get their *BeginPlay events yet.

The thing now is... I tried to do this function that I call in InitGame of MyGameInfo:

Code:
function bool SetFailures()
{

        local Actor A;
        
        log("Passed here point 1");

        ForEach AllActors( class 'Actor', A, 'Actor' )
        {
              log("Passed here point 2");
        }



        return true;

}

The result on script on loading is that it shows:
"Passed here point 1"

But it never shows:
"Passed here point 2"

My problem is I wanted to do something when it is passing point 2. Any reason for me having this problem them?
 
Last edited:

PTGui

New Member
Mar 7, 2006
31
0
0
You are right... If I leave it out it works.

It was a stupid thing I was doing and the reason is simple: the tags are all in the actor after the PostBeginPlay() of the actor. This step is only done after de InitGame, so it makes sence.

But now, how can I know what is the one actor I want to change if I can't check the matchtag?
 
Last edited:

PTGui

New Member
Mar 7, 2006
31
0
0
Great. Thank you guys for all the help. Problem solved :p

Gibberstein, yes it did the trick...