Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / Different Pause Menus for Different Levels?

Author
Message
007
13
Years of Service
User Offline
Joined: 22nd Aug 2011
Location:
Posted: 24th Feb 2012 01:22
Hello Friends,

I was messing up a bit about HUDS on FPS Creator.

I know you can have in example, different skybox per level, different ambience for different levels and such, because, by default FPS Creator creates different loadingpage.fpi for each level, so is just specify the skybox that you want to load on each loadingpage.fpi (see official community guide).

But i was trying to have different pause menus for each level, because, i want that when player presses "m" key (i.ex), it will pause the game, and load a menu that contains some informations about the mission. I will use the GUI-X9 commands to load the images, swap for other images. Like if the player will "open" a dossier, with some pages, with buttons that will load others images (dossier pages), and each image will have a text written on it.

But the problem is that when i use the "pausegame" command on an entity, it does not work, it freezes the game.

It seems that "pausegame" command does only work when specified in the setuplevel.fpi, not when running by an entity.

Anyone has an idea on how can i do this, show different pause menus for each level?

Cheers,

007

Goldenye 007 N64
007
13
Years of Service
User Offline
Joined: 22nd Aug 2011
Location:
Posted: 24th Feb 2012 22:15
No ideas?

Goldenye 007 N64
Marc Steene
FPSC Master
18
Years of Service
User Offline
Joined: 27th Mar 2006
Location: Bahrain
Posted: 26th Feb 2012 14:49
I remember Project Blue had a command which could freeze the game and allow the player to use the mouse, but I'm not sure if there's anything equivalent in the current stock version.


Specs: Alienware M17x R3. i7-2630QM. 8GB RAM. Nvidia 560m. Momentus XT Hybrid Drive.
007
13
Years of Service
User Offline
Joined: 22nd Aug 2011
Location:
Posted: 26th Feb 2012 15:21
Thanks for the repply dear marc steene.

I am trying to use a main setuplevel.fpi, and in this setuplevel.fpi i will try to use the command "runfpi", so, for each level i will have a specific setuplevel.fpi that will be called by the main setuplevel.fpi. And i will use variables to store the level number, so the main setuplevel.fpi will know on each level the player is and will call the respective setuplevel.fpi of each level.

I am trying, and will come back later.

Thanks

Goldenye 007 N64
maho76
13
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 26th Feb 2012 16:40 Edited at: 26th Feb 2012 16:45
How to build a multi-level fpsc x9 game. [Tutorial]
by
Defy

inclusive: CHANGING SKYBOX PER LEVEL - BASED ON DAVY B'S GREAT TUT.
http://forum.thegamecreators.com/?m=forum_view&t=170920&b=21

just for info.

i would try to use variables so you can setup all pause-infos into 1 setup.ini ... defining dimvars at the beginning of the level. ... if it works that setup.ini can contain dimvars, i dont know.

007
13
Years of Service
User Offline
Joined: 22nd Aug 2011
Location:
Posted: 26th Feb 2012 18:47
Yes Dear Maho,

I thought also setup all pause menu huds into only 1 setuplevel.fpi (not setup.ini), however, it would need an immense number of lines, because each level will have 3 pause menus (one for each difficulty, containing all the mission briefing).

And each pause menu will have submenus with a lot of hud elements, a lot of pictures.

In example:

Pause menu ----> Mission Status
----> Mission Briefing History
----> Mission Objectives Explained
----> Mission Equipment Inventory

And all this will be multiplied by 3 (pause menu for easy, medium and hard)

Its a lot of work, but i am sure that is worth doing, because in the end, i will have a real playable and enjoinable FPS Creator Game, that i am very proud of said, it will be (God willing), so good as a "Real" Market Videogame.

I am still striving.

Cheers,

007.

Goldenye 007 N64
maho76
13
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 26th Feb 2012 22:45
watch out: maxlength on fpi-scripts. ...& the longer a script the more lagg produced. so dont make the "surroundings" too complex and forget the game itself.

007
13
Years of Service
User Offline
Joined: 22nd Aug 2011
Location:
Posted: 10th Mar 2012 00:12
Hello Folks,

After days and days of headaches, i was able to create different pause menus for different levels.

My idea, for my 007 fan game, is that in each stage the player will access a "mission dossier" that contains 2 pages, one page is with the mission objectives explained, and the 2nd page is for a fake inventory, that will list the famous "007 Gadgets" that are avaiable for use in the current misson, with a little explanation on how to use them.

In fact this pause menu is not interactive, i don`t need it, this is just a way to have ingame instructions for the player, and each level will have a different "dossier", containing different informations.

I could do it easily with a trigger zone and just with a "scancodekeypressed" command. However, the player will not be able to read those briefings calmly, because there is no way to pause the game except using the setuplevel.fpi script. And i have done like the game Goldeneye 007 Pause menu, when the player pauses the game, he has access to a lot of options, like reading mission briefing, mission objectives, load game, save game, and such.

And i have done this same way.

This script works perfectly, but the only problem is that i stuck in the 350 lines per script limit.

I plan to have from 18 to 20 levels for my game, and with this limit of 350 lines per script, i would not be able to have a pause menu for more than 8 to 9 levels (because i repeated the pause game script to each level).

I spent more than one week until find a way for it to work, i tried a lot of things, tried the command "runfpi" as a way to have different setuplevel.fpi for each level, but none of those trials worked.

The only way that i could make it to work is as follows in the bottom of this post.

If someone has an idea of how could i overcome this 350 lines limit per script to have all the pause menus for all my 20 levels inside the setuplevel.fpi, i would be very gratefull.

Or even another idea, other workarround is also welcome.

Obs: The pause game command DOES NOT WORK WHEN CALLED OUTSIDE the setuplevel.fpi. I even asked Scene Commander, and he confirmed this.

Cheers,

007.



Goldenye 007 N64
The Zombie Killer
13
Years of Service
User Offline
Joined: 27th Mar 2011
Location: Gold Coast, Australia
Posted: 10th Mar 2012 03:43
@007
I can edit the source and make a version just for you that raises the limit from 350 to 10,000. Just let me know if you want it

-TZK

007
13
Years of Service
User Offline
Joined: 22nd Aug 2011
Location:
Posted: 10th Mar 2012 10:16
Oh man,

Thanks, thanks, thanks.

I am very gratefull, you are a true gentleman!

But i will not want this for now, because i will go on in to my studies, and whenever i begin the Project (because i created a workflow for this project, and i am now in 60% of concluding my studies, next step will be study shaders creation and level design using 3dsmax), i will ask this for you.

I will not use it by now also because i know that until i begin my game project, there will be a newer version of fpsc, so i will want to use the latest avaiable version of fpsc when i begin my project. And when i begin my project i will ask you to do this edit for me.

But again, i have no words to say how gratefull i am, my dear friend.

Thanks,

007.

Goldenye 007 N64
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 10th Mar 2012 15:52
@ 007,

Quote: "After days and days of headaches, i was able to create different pause menus for different levels."


Great job on this. As you mentioned, this approach will pause the game so the player will not miss anything or get "attacked" while reading, etc. The downside as you mentioned is that you are limited to the 350 lines and one could easily reach that as you have discovered. Our inventory script hit that mark and we had to increase our line cap to accommodate what we needed.

@ TZK,

Quote: "I can edit the source and make a version just for you that raises the limit from 350 to 10,000"


The line cap is there for a reason. If you increase it to that many lines (10,000), then the system will be spending time running those lines of code and can slow a game down. 10,000 is a bit excessive. You may try around 500 first, maybe 1000 max. I have not needed to exceed 500 lines yet.


Twitter: @NFoxMedia
007
13
Years of Service
User Offline
Joined: 22nd Aug 2011
Location:
Posted: 11th Mar 2012 02:21
High Black Fox,

I'm happy you understood my idea, pause the game to give the player the chance to read the mission briefing and get more "in deep" with the game history.

And about the lines, i think something arround 500-600 lines will be enough for me.

But as i said, i am not build my game now, so i will proceed in my workflow, next step will be design a level completely in 3dsmax and i am very for this.

I will try to use VRAY to create pre rendered lighting and shadows on the levels, to make something cool.

Cheers,

007.

Goldenye 007 N64
The Zombie Killer
13
Years of Service
User Offline
Joined: 27th Mar 2011
Location: Gold Coast, Australia
Posted: 11th Mar 2012 03:30
@Blackfox
Yeah, I agree, I think I went a little overkill with 10,000 lol. I'll do 1000 or 600 then, depending on what 007 wants.

-TZK

Login to post a reply

Server time is: 2024-11-24 02:36:09
Your offset time is: 2024-11-24 02:36:09