DXOnly - Why isn't it calling PlayerTick?

A refuge for those migrating from the fallen DXEditing.com and a place for general discussion relating to Deus Ex editing (coding, mapping, etc).
Post Reply
User avatar
bjorn98009_91
Silhouette
Posts: 688
Joined: Thu May 08, 2008 8:17 am
Location: Hufvudstaden, Sweden
Contact:

DXOnly - Why isn't it calling PlayerTick?

Post by bjorn98009_91 »

Hi!

Anyone around that knows why the map DXOnly doesn't call PlayerTick? The map DX calls PlayerTick as it should, but DXOnly does not. Anyone got any ideas on how to run my code if I can't use PlayerTick?
Producer and Quality Assurance Manager for Deus Ex: Revision.
Hanfling
MJ12
Posts: 406
Joined: Sun Oct 04, 2009 6:54 pm

Re: DXOnly - Why isn't it calling PlayerTick?

Post by Hanfling »

Maybe use GameInfo's Tick() ?

or MissionScript's ?
I demand my DXE User ID back. Launcher for DeusEx, Rune, Nerf, Unreal & Botpack. HX on Mod DB. Revision on Steam.
User avatar
bjorn98009_91
Silhouette
Posts: 688
Joined: Thu May 08, 2008 8:17 am
Location: Hufvudstaden, Sweden
Contact:

Re: DXOnly - Why isn't it calling PlayerTick?

Post by bjorn98009_91 »

Hmm, turns out the code must be run in the player class or parent classes to that, since I need access to the ClientSetMusic function. I managed to get the game print out logs for the map using

event TravelPostAccept(), event PreBeginPlay() and event PostBeginPlay()

However, if calling ClientSetMusic in any of those functions it will do nothing (I'm assuming, since the music player isn't set up at that stage.). I can't use missionscripting, since I need to run my own UpdateDynamicMusic function (or atleast be able to access ClientSetMusic). Can't use GameInfo either, or could I find the playerpawn from my MissionScript/GameInfo sript and use player.UpdateDynamicMusic(0)? If so, how do I do that?

Edit: Don't answer that! I'm working on something now that might work.
Producer and Quality Assurance Manager for Deus Ex: Revision.
User avatar
bjorn98009_91
Silhouette
Posts: 688
Joined: Thu May 08, 2008 8:17 am
Location: Hufvudstaden, Sweden
Contact:

Re: DXOnly - Why isn't it calling PlayerTick?

Post by bjorn98009_91 »

Alright now I've gotten the music to work by using the Timer function in my custom GameInfo.

Thanks for the tip Hanfling! :)
Producer and Quality Assurance Manager for Deus Ex: Revision.
Hanfling
MJ12
Posts: 406
Joined: Sun Oct 04, 2009 6:54 pm

Re: DXOnly - Why isn't it calling PlayerTick?

Post by Hanfling »

Correct answer:

Code: Select all

// DeusExPlayer.uc

// ----------------------------------------------------------------------
// TravelPostAccept()
// ----------------------------------------------------------------------

event TravelPostAccept()
{
		// [...]

		// hack for the DXOnly.dx splash level
		if (info.MissionNumber == -1)
		{
			ShowHud(False);
			GotoState('Paralyzed');
			return;
		}
		// [...]
}

// [...]

// ----------------------------------------------------------------------
// state Paralyzed
// ----------------------------------------------------------------------

state Paralyzed
{
	// [...]

	event PlayerTick(float deltaTime)
	{
		UpdateInHand();
		ShowHud(False);
		ViewFlash(deltaTime);
	}

	// [...]
}

So Global.PlayerTick() is not called.
I demand my DXE User ID back. Launcher for DeusEx, Rune, Nerf, Unreal & Botpack. HX on Mod DB. Revision on Steam.
User avatar
bjorn98009_91
Silhouette
Posts: 688
Joined: Thu May 08, 2008 8:17 am
Location: Hufvudstaden, Sweden
Contact:

Re: DXOnly - Why isn't it calling PlayerTick?

Post by bjorn98009_91 »

Ahh, I did notice that it went to state 'Paralyzed' but didn't check what that state meant.
Producer and Quality Assurance Manager for Deus Ex: Revision.
Post Reply