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 / Fps Creator: Possible to make a Game with previous and next level?

Author
Message
Liquid Blaze
12
Years of Service
User Offline
Joined: 3rd Aug 2012
Location:
Posted: 21st Aug 2012 15:30
Hi

I wanted to ask this because I made a RPG game and need it. I've searcht already on the forums but there was no topics about my question.


is it possible to create a Game in that you can go back to the previous level and to the next one?


Regards
Liquid
maho76
13
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 21st Aug 2012 16:36 Edited at: 21st Aug 2012 17:47
google-forum-search: fpsc HUB level
> http://forum.thegamecreators.com/?m=forum_view&t=188263&b=23

and btw. RPG-mod is made for rpg-fps games. should be the right thing for you, but not for beginners (most(edit: some) people even cant install it propperly^^)

Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 21st Aug 2012 17:38
Actually, I hope that it is not most people who can't install.

But, certainly some people have difficulties.

"A programmer is just a tool which converts caffeine into code . . . reminds me….. if I had one more brain cell, I could have a synapse! woo hoo, Sparky!

~I'm the Terry of the Flatlands.
maho76
13
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 21st Aug 2012 17:48
you are right... as always.

edited.

Liquid Blaze
12
Years of Service
User Offline
Joined: 3rd Aug 2012
Location:
Posted: 21st Aug 2012 18:25
Hehe thanks for the infos
The Storyteller 01
15
Years of Service
User Offline
Joined: 11th May 2009
Location: On a silent hill in dead space
Posted: 21st Aug 2012 18:58
From ched80's unofficial fpsc complete script syntax list iss4:
Quote: "3.14.2.8 NEXTLEVEL=X
Description: This defines which level will be the next when the win zone is triggered. In order to make the action work, it may be necessary to use the “suspend” action after the “nextlevel=” action.
Range: X = 0 to highest level.
Example: :state=1:nextlevel=4,suspend"


I never tried it out but to me reads that I simply can choose to which level the next winzone transports me.

If a level has diferent "exits" it should work with a trigger zone that scripts NEXTLEVEL= in front of each winzone.

In case you find my grammar and spelling weird ---> native German speaker ^^
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 21st Aug 2012 19:06 Edited at: 22nd Aug 2012 16:33
Quote: "I never tried it out but to me reads that I simply can choose to which level the next winzone transports me.

If a level has diferent "exits" it should work with a trigger zone that scripts NEXTLEVEL= in front of each winzone."


Exactly. We use it to traverse back and forth between levels. For example, I have level 3 as a hub and it contains three doors. One door goes to level 4; one to level 5; one to level 6. If I want to go to level 5 from level 3, then I have this script attached to a triggerzone:

Traverse to Level 5 from Level 3



In level 5, I have a trigger spawn at the point I enter the level (usually it is triggered by me picking something up or by another trigger). The script returns me back to level 3.

Return to Level 3 from level 5



Does not get as simple as that.


Twitter: @NFoxMedia
Mr illusionest
15
Years of Service
User Offline
Joined: 5th Mar 2009
Location: Cairo , Egypt
Posted: 21st Aug 2012 20:16
That actually makes me ask an important question : does a global var value move through levels ? If I have a global var set to 5 in level 3 and I go back to level 2 , would it still be 5 ?

"I am the night visitor when everyone is sleep , and when the last light fades"
The illusionest
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 21st Aug 2012 20:34
Quote: "That actually makes me ask an important question : does a global var value move through levels ? If I have a global var set to 5 in level 3 and I go back to level 2 , would it still be 5 ?"


**NOTE**
I give this answer based on v1.17 since we use this version and have ported the variable system into our source. Since we have not used variables in any other version, the results may have changed. If so, I am certain anyone using newer versions can verify if the results are the same or not.
**/NOTE**

Global variables reset at the start of each level. If I use a global var that has a value of 5 and return to a previous level, I have to create a script that would "initialize" the global variable(s) used and set their values where they should according. For example, I enter level 5 from level 3, collect two keys, and the script sets the global variable to 2. When I return to level 3, the value of that global variable is reset to 0 when I spawn. I then would need to have a trigger and script set the global variable to the value I require.

In traversing levels back and forth, I use "dimvar=keys" and "setvar=keys 2". The value set for the specified variable is carried from one level to another. I do not need to have a script initializing values of variables using this method. So when I enter level 5 from level 3, I collect the two keys and the script sets the variable "keys" to a value of 2. When I return back to level 3, the variable "keys" still has a value of 2.

This was why we ported the variable system into our source. It is easier and requires less scripting on the developer side.


Twitter: @NFoxMedia
Mr illusionest
15
Years of Service
User Offline
Joined: 5th Mar 2009
Location: Cairo , Egypt
Posted: 21st Aug 2012 20:47
Thanks BlackFox , However I would like to point to this thread :
http://forum.thegamecreators.com/?m=forum_view&t=188263&b=23
I just downloaded the HUB system from there , It uses a var called PrevLvl to transport the player to the exit point when he leaves a level to another , this script sets the variable before leaving :


and this one moves the player to the point he should be in the next level :


If I understood this system right , He only used dimvar=PrevLvl to retrieve the variable value . It seems to work in v1.18 and accordingly in any versions above .

"I am the night visitor when everyone is sleep , and when the last light fades"
The illusionest
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 21st Aug 2012 21:03
Quote: "If I understood this system right , He only used dimvar=PrevLvl to retrieve the variable value . It seems to work in v1.18 and accordingly in any versions above "


Correct. We can use this as well since we have the same system ported in as the current version contains.

Here is an example of using "globalvar". The first level has a trigger and the script will set the value of globalvar=1 to 0, then set it to a value of 1 when the player leaves the zone.



Now I enter level 2 and enter a trigger zone. The script in that zone checks the value of my globalvar=1 and displays a message according.



The result of this example? Globalvar=1 has a value of 0. The point of this was to show you that global variables used in this method reset to 0 each level start (at least in our version). By using "dimvar=keys, setvar=keys 2", the variable value of keys carries from level to level.


Twitter: @NFoxMedia
Mr illusionest
15
Years of Service
User Offline
Joined: 5th Mar 2009
Location: Cairo , Egypt
Posted: 21st Aug 2012 21:22
Thanks very much BlackFox , I appreciate your time

"I am the night visitor when everyone is sleep , and when the last light fades"
The illusionest
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 21st Aug 2012 21:28
No problem. Happy to help out fellow developers anytime.


Twitter: @NFoxMedia
Liquid Blaze
12
Years of Service
User Offline
Joined: 3rd Aug 2012
Location:
Posted: 22nd Aug 2012 12:36 Edited at: 22nd Aug 2012 16:14
@BlackFox Hm, I used the Traverse script but always when I enter the trigger zone nothing happens .

I tryed it with 3 levels. Level3 shall bring me back to Level2.



Hm, do I a mistake?
The Storyteller 01
15
Years of Service
User Offline
Joined: 11th May 2009
Location: On a silent hill in dead space
Posted: 22nd Aug 2012 15:03 Edited at: 22nd Aug 2012 15:04
1. Your script should have NEXTLEVEL=3 (not=1) if you want the player to move to level 3

2. I don't know which of my scripts we are talking about, sry

3. Its regared unpolite on english spoken forums to talk in another language as long as one can do it in english too. You can send me emails in german of course but belive me, if you are seriously scripting in english, you start thinking in english as well - and eventually it becomes easier to talk about scripts in english too, even if you hadn't to

In case you find my grammar and spelling weird ---> native German speaker ^^
Liquid Blaze
12
Years of Service
User Offline
Joined: 3rd Aug 2012
Location:
Posted: 22nd Aug 2012 16:17
I want that the player moves to level 2 from level 3[The whole game has 3 levels]
The Storyteller 01
15
Years of Service
User Offline
Joined: 11th May 2009
Location: On a silent hill in dead space
Posted: 22nd Aug 2012 16:36
Try this one:


In case you find my grammar and spelling weird ---> native German speaker ^^
Liquid Blaze
12
Years of Service
User Offline
Joined: 3rd Aug 2012
Location:
Posted: 23rd Aug 2012 00:04
Hm, nothing happens when I enter the zone....

Try it out and see for yourself...
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 23rd Aug 2012 00:19
Quote: "Hm, nothing happens when I enter the zone....

Try it out and see for yourself..."


I tried it, and it works. I never post example scripts that never work. Mind you, the exact script I use is more extensive because there are variables for other things needed. The script Storyteller altered for you did work for me in my Traversing Levels example.

Are you using x9 or x10?


Twitter: @NFoxMedia
The Storyteller 01
15
Years of Service
User Offline
Joined: 11th May 2009
Location: On a silent hill in dead space
Posted: 23rd Aug 2012 00:20
Did you put a trigger zone with the above scipt in front of a winzone?

If yes and it didn't work, i'll set it up myself - but tommorow since its 23:20 in my country and I am watching "Below"

In case you find my grammar and spelling weird ---> native German speaker ^^
Liquid Blaze
12
Years of Service
User Offline
Joined: 3rd Aug 2012
Location:
Posted: 23rd Aug 2012 00:22
X10 Maybe is that the issue for it?
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 23rd Aug 2012 00:32 Edited at: 23rd Aug 2012 00:34
Quote: "Did you put a trigger zone with the above scipt in front of a winzone?"


You don't need a winzone. It is just a trigger I used.


Quote: "X10 Maybe is that the issue for it? "


That is the issue. The "nextlevel" action is not in the x10 source. It was an action command that was brought into x9 v1.18.

Quote: "If yes and it didn't work, i'll set it up myself - but tommorow since its 23:20 in my country and I am watching "Below""


It's all good, Storyteller. I have you covered. Enjoy your show.


Twitter: @NFoxMedia
Liquid Blaze
12
Years of Service
User Offline
Joined: 3rd Aug 2012
Location:
Posted: 23rd Aug 2012 00:34 Edited at: 23rd Aug 2012 00:34
Hmm... is there another command like "nextlevel" That works with X10?
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 23rd Aug 2012 00:36
Quote: "Hmm... is there another command like "nextlevel" That works with X10? "


I scanned over the x10 source and it appears there is not.


Twitter: @NFoxMedia
Liquid Blaze
12
Years of Service
User Offline
Joined: 3rd Aug 2012
Location:
Posted: 23rd Aug 2012 00:39 Edited at: 23rd Aug 2012 00:46
Nooooooo

Any other ideas?

Login to post a reply

Server time is: 2024-11-23 22:29:54
Your offset time is: 2024-11-23 22:29:54