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.
ScriptCB for pausing the game?
Moderator: Moderators
-
jedimoose32
- Field Commander

- Posts: 938
- Joined: Thu Jan 24, 2008 12:41 am
- Projects :: Engineering Degree
- Location: The Flatlands of Canada
-
razac920
- 2nd Lieutenant

- Posts: 365
- Joined: Sun Jan 16, 2011 12:42 am
Re: ScriptCB for pausing the game?
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.
-
jedimoose32
- Field Commander

- Posts: 938
- Joined: Thu Jan 24, 2008 12:41 am
- Projects :: Engineering Degree
- Location: The Flatlands of Canada
Re: ScriptCB for pausing the game?
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.)
- [RDH]Zerted
- Gametoast Staff

- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
Re: ScriptCB for pausing the game?
I don't know of a pausing method, but ScriptCB_Unpause takes a viewpoint, so for the PC you'd use: ScriptCB_Unpause(0)
-
jedimoose32
- Field Commander

- Posts: 938
- Joined: Thu Jan 24, 2008 12:41 am
- Projects :: Engineering Degree
- Location: The Flatlands of Canada
Re: ScriptCB for pausing the game?
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.
-
Marth8880
- Resistance Leader
- Posts: 5042
- Joined: Tue Feb 09, 2010 8:43 pm
- Projects :: DI2 + Psychosis
- xbox live or psn: Marth8880
- Location: Edinburgh, UK
- Contact:
Re: ScriptCB for pausing the game?
Right?
And what else sucks is that there's no sort of Update() function that's called every frame.
And what else sucks is that there's no sort of Update() function that's called every frame.
-
jedimoose32
- Field Commander

- Posts: 938
- Joined: Thu Jan 24, 2008 12:41 am
- Projects :: Engineering Degree
- Location: The Flatlands of Canada
Re: ScriptCB for pausing the game?
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.
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.
- TWINKEYRUNAWAY
- Lieutenant General

- Posts: 730
- Joined: Fri Aug 17, 2012 3:13 pm
- Projects :: Empire Rising
- xbox live or psn: No gamertag set
- Location: 411Remnant
- Contact:
Re: ScriptCB for pausing the game?
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.
- [RDH]Zerted
- Gametoast Staff

- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
Re: ScriptCB for pausing the game?
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.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
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.
