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?
DXOnly - Why isn't it calling PlayerTick?
- bjorn98009_91
- Silhouette
- Posts: 688
- Joined: Thu May 08, 2008 8:17 am
- Location: Hufvudstaden, Sweden
- Contact:
DXOnly - Why isn't it calling PlayerTick?
Producer and Quality Assurance Manager for Deus Ex: Revision.
Re: DXOnly - Why isn't it calling PlayerTick?
Maybe use GameInfo's Tick() ?
or MissionScript's ?
or MissionScript's ?
- 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?
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.
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.
- 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?
Alright now I've gotten the music to work by using the Timer function in my custom GameInfo.
Thanks for the tip Hanfling!
Thanks for the tip Hanfling!
Producer and Quality Assurance Manager for Deus Ex: Revision.
Re: DXOnly - Why isn't it calling PlayerTick?
Correct answer:
So Global.PlayerTick() is not called.
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);
}
// [...]
}
- 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?
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.