ScriptLog: PostPostBeginPlay Called
ScriptLog: There is no player :/
Log: Spawning new actor for Viewport WindowsViewport0
ScriptLog: Team 0
ScriptLog: Login: Player
ScriptLog: MYCHK:: 5 :: 79
ScriptLog: Lean Keys UNDEFINED, disabling tiptoes
ScriptLog: Team 0
Log: Possessed PlayerPawn: JCDentonMale 01_NYC_UNATCOIsland.JCDentonMale1
I used PostPostBeginPlay() of an actor already placed in the map to log if (player == none) log("There is no player ");
player being player = DeusExPlayer(GetPlayerPawn());
So, to be able to reference the player before possession using a beginPlay function, what can I do? Is there a beginPlay function (or something similar called once the object is spawned) that is called after player possession, in the case of pre-placed actors in a map?
Prebeginplay, beginplay, postbeginplay and even postpostbeginplay. There are loads.
What are you trying to do, exactly? If your code is critically dependent on a possessed playerpawn, why not have the playerpawn itself call it once possessed?
I've put fucktons of code into my playerclass because it's one of the few things you can guarantee will definitely be there, and doing stuff, when you want things to happen.
DDL wrote:Prebeginplay, beginplay, postbeginplay and even postpostbeginplay. There are loads.
Yeah, but all are called before player possession. PostPostBeginPlay being the last called.
What are you trying to do, exactly? If your code is critically dependent on a possessed playerpawn, why not have the playerpawn itself call it once possessed?
I guess I'll have to. I want to do a variety of things upon initialization that involve both DeusExPlayer and various actors.
I wrote all my stuff to work with vanilla deusex.u (coz I didn't like the idea of replacing core code), so my player class literally sweeps through the entire level at runtime and replaces every actor with my own modified versions, transferring properties across as necessary.
It's insanely inefficient coding and would probably make any rational programmer weep, but the take home message is: it's doable.
I'd also be cautious about interpreting log messages, especially with startup stuff. I've found some things seem to merrily log that they can't find a player, but then work entirely correctly as if they had found the player, so it's....confusing.