Page 1 of 1
ScriptCB for pausing the game?
Posted: Sat May 09, 2015 2:37 pm
by jedimoose32
Hi everyone.
The title says it all. I'm wondering if there's any way I can pause the game. There's a ScriptCB_Unpause() but there's no ScriptCB_Pause() that I can find. Is there another method I can use?
Thanks.
Re: ScriptCB for pausing the game?
Posted: Sat May 09, 2015 3:37 pm
by razac920
Well, nothing that I know of, but of course pausing only works in singleplayer and so a simple workaround is to use a campaign popup to pause the game.
Re: ScriptCB for pausing the game?
Posted: Sat May 09, 2015 4:36 pm
by jedimoose32
That's not a bad idea. I'll consider using that as a workaround. (And yeah, this is only required for single player, so that's great.)
Re: ScriptCB for pausing the game?
Posted: Sat May 09, 2015 8:10 pm
by [RDH]Zerted
I don't know of a pausing method, but ScriptCB_Unpause takes a viewpoint, so for the PC you'd use: ScriptCB_Unpause(0)
Re: ScriptCB for pausing the game?
Posted: Sun May 10, 2015 12:17 am
by jedimoose32
Yeah, I noticed that about Unpause. It's too bad that there's no clean way to pause. I'll try to come up with something hackish I guess. Thanks anyway.
Re: ScriptCB for pausing the game?
Posted: Sun May 10, 2015 12:37 am
by Marth8880
Right?
And what else sucks is that there's no sort of Update() function that's called every frame.
Re: ScriptCB for pausing the game?
Posted: Sun May 10, 2015 2:51 am
by jedimoose32
So, the objective popup screen appears over top of the interface, apparently. Which means that option won't work. I also tried pushing the pause menu first and then pushing my menu, but that didn't work. There must be something hard-coded into the game that causes the game to pause when you press Esc/Start.

It's not vital that the game be totally frozen while the player is in this menu, it's just that whenever the player moves the cursor around the character's view moves as well, and when the player clicks on a button the character's weapon fires.

So I guess I'll either try and put this screen into the Class Selection screen so it comes up before they first spawn, or I'll have to rig up an invisible, weaponless turret that the player is forced into while the screen is open.

Re: ScriptCB for pausing the game?
Posted: Sun May 10, 2015 11:36 am
by TWINKEYRUNAWAY
Good luck on this bro. What I do is use xpadder and assign the esc button to the start button in my controller. It would be nice to not have to use that method everytime I start battlefront.
Re: ScriptCB for pausing the game?
Posted: Fri May 22, 2015 2:50 pm
by [RDH]Zerted
jedimoose32 wrote:I also tried pushing the pause menu first and then pushing my menu, but that didn't work. There must be something hard-coded into the game that causes the game to pause when you press Esc/Start.
So I guess I'll either try and put this screen into the Class Selection screen so it comes up before they first spawn
Are you saying if you directly push an IScreen from an ingame script it doesn't unlink the input to the player? Does that also happen when only pushing the pause menu? You can rewrite the pause menu to only show your data the first time it's displayed.
There should be a way to intercepts event messages (such as button clicks) and halt the message from going further. Does your screen try that?
I think v1.3 makes a couple minor changes to the team select page. If you add your content there you should do it by injecting it as a function wrapper instead of replacing the whole file.