Execute Function Before Match Begin

Discussions about Coding and Scripting
Post Reply
1337GameDev
Skilled
Posts: 198
Joined: Thu Apr 16, 2020 3:23 pm
Personal rank: GameDev

Execute Function Before Match Begin

Post by 1337GameDev »

I am curious if there is a function that can be overridden in actor / another trick to run code before players spawn but the map / game is ready for players to begin.

This would be for a Mutator and Actor class, and if possible be independent of gametype.

Is this possible?
User avatar
sektor2111
Godlike
Posts: 6411
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Execute Function Before Match Begin

Post by sektor2111 »

Only DeathMatchPlus has "StartMatch" Coop SinglePlayer are not using this.

But in a map or a mod you can deploy some needs in PostBeginPlay or after a few ticks, or in whatever "auto state" after 0.1 seconds or... other conditions.
1337GameDev
Skilled
Posts: 198
Joined: Thu Apr 16, 2020 3:23 pm
Personal rank: GameDev

Re: Execute Function Before Match Begin

Post by 1337GameDev »

Hmm, this seems to describe the chain of events, and their order:

https://wiki.beyondunreal.com/Legacy:Ch ... el_Startup

Looks like Actor.PreBeginPlay or GameInfo.InitGame is what I want.
User avatar
sektor2111
Godlike
Posts: 6411
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Execute Function Before Match Begin

Post by sektor2111 »

You are not having InitGame in Mutator.

PostBeginPlay or BeginPlay or PrebeginPlay - all of them might help here because they are happening before starting game.
Post Reply