Scripts / a newbie question about multilevels

Author
Message
silversoulz
9
Years of Service
User Offline
Joined: 15th Oct 2014
Location: italy
Posted: 22nd Dec 2014 09:21
hello all,i want to know how i can ad a level in the winzone or triggerzone
i need the script or a tutorial to learn better this lua language
thx again


silver is light
PM
cybernescence
GameGuru Master
11
Years of Service
User Offline
Joined: 28th Jan 2013
Playing: Cogwheel Chronicles
Posted: 22nd Dec 2014 14:24
Add a 'Win Zone' from the 'Markers' tab into your first level where you need it and in the properties of the win zone itself (left click it and select 'properties') enter the name of the next level (the map name) into the 'IfUsed' field and save.

Once you've built your levels ('Save Standalone' from file menu), when you enter the winzone of the first level, this level will fade out and the other level will load.

Hope this helps.

silversoulz
9
Years of Service
User Offline
Joined: 15th Oct 2014
Location: italy
Posted: 22nd Dec 2014 14:39
the whole path of the map level name or just the name of it?
thx again

silver is light
PM
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 22nd Dec 2014 15:31 Edited at: 22nd Dec 2014 15:33
I have messed with this, wrote a script to change level, but beyond triggering some text saying load level has been triggered or the name of the level I forget now, not actually managed to change levels. I assumed it needs to be in a standalone to work, but was not really sure where to put the level2 data. I left it there at that point. How did you setup your main game and sub levels?



SPECS: Q6600 CPU. Nvidia 660GTX. 8 Gig Memory. Win 7.
cybernescence
GameGuru Master
11
Years of Service
User Offline
Joined: 28th Jan 2013
Playing: Cogwheel Chronicles
Posted: 22nd Dec 2014 16:15 Edited at: 22nd Dec 2014 16:16
Hi - just the map name, without any extension. When you test in editor it pops up a message only, but when the levels are built (standalone) moving into the win zone loads the other standalone level. EDIT: don't think you can carry forward any data yet

arvk
15
Years of Service
User Offline
Joined: 22nd Aug 2008
Location:
Posted: 22nd Dec 2014 18:44
Hello! For me to load levels I put level name also extension fpm, (levelname.fpm). Save as standalone, Then I edit contents.txt,
At last line edit typo (levelname.fpm.fpm). To (levelname.fpm), Also remember to copy your other levels to map folder. Also same for models,scripts,ect. If I use just level name will not work only acts just as a win zone. Then starts game again. Works just like it aught to except for typo.

Arvk
PM
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 22nd Dec 2014 18:56
Got it to work, the script was okay, just needed to copy over all the data from the second standalone, otherwise it just loads the first level back up.



SPECS: Q6600 CPU. Nvidia 660GTX. 8 Gig Memory. Win 7.
cybernescence
GameGuru Master
11
Years of Service
User Offline
Joined: 28th Jan 2013
Playing: Cogwheel Chronicles
Posted: 22nd Dec 2014 20:21
I didn't need to copy any data over or edit any contents.txt.

I think the "build standalone" option is picking up that there is another map and then building one executable that contains both level and all assets required. This is when used as I described with a Win Zone.

Jerry Tremble
GameGuru TGC Backer
11
Years of Service
User Offline
Joined: 5th Nov 2012
Location: Sonoran Desert
Posted: 23rd Dec 2014 00:39
Build standalone does automatically pick up any additional maps and places them in the new game folder, along with entities, etc. No extension necessary in the properties box. Pretty sweet addition to this awesome beta!

MAME Cab PC: i7 4770@3.4Ghz (passmark 9945), 12GB RAM, Win 8.1/64, GeForce GTX645 (passmark 1898); Shiny new laptop: i7 4800MQ@2.7Ghz (passmark 8586), 16GB RAM, Win 8.1/64, GeForce GTX870M (passmark 3598); Old laptop: i5@2.3Ghz, 8GB RAM, Win 7/64, Intel 3000 graphics
PM
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 24th Dec 2014 17:07
Ah I see. Still, if you use a script, it does not pick this up. I made 2 levels, with scripts in each. Made a standalone of both. When running it would just run level 1 again or go back to the start screen. After manually merging the second level into the first standalone I can freely jump from level 1 to level 2 and back again. I was looking to test having several levels load from one, which works fine, when you copy the files over. I think of the winzone as just that so would only use it for the final win scenario. I also wanted to have control of entering the zone via the e key.

I must admit I don't tend to use zones very often in the main, as I prefer to use custom scripts embed into objects and use distance etc to trigger events. I will have to look into using some of the inbuilt options more I think.



SPECS: Q6600 CPU. Nvidia 660GTX. 8 Gig Memory. Win 7.
Avram
GameGuru TGC Backer
17
Years of Service
User Offline
Joined: 3rd Sep 2006
Location: Serbia
Posted: 24th Dec 2014 17:45
It seems it will copy a level if you use a winzone along with "ifused" field. It can not parse LUA code and extract levels from that. I mean it is probably possible, but still... it's probably time consuming to do that.

DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 24th Dec 2014 18:34
Yes I can quite understand why it doesn't work with a script, but obviously may be used in this way, as the commands exist . At one point Reloaded didn't even copy script files over on a standalone, so these things need to be reported. Perhaps in this case I can use the ifused option with an object in the same way I have not checked As I say, I tend to script it all once I start and forget these things even exist at times, and end up reworking the wheel.



SPECS: Q6600 CPU. Nvidia 660GTX. 8 Gig Memory. Win 7.
Sacalac
9
Years of Service
User Offline
Joined: 3rd Sep 2014
Location: Detroit, MI
Posted: 27th Dec 2014 19:01
We need to be able to carry items from one level to another and then back again. Inventory that moves to each level as you do. Also load time to change LVL is way too long.

Sacalac
Pirate Myke
Forum Support
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 7th Mar 2015 17:53
Ok guys on the levels jumping thing. Build standalone for the first level LAST. Don't know why, but it functions that way.

We realize that this is not intuitive, and a method is being worked on for a better system.

But this function does indeed work.

REMEMBER to build standalone level 1 last.

Thanks you.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit

nuncio
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 28th Jan 2015
Location: Schleswig Holstein, Germany
Posted: 26th Apr 2015 01:38
i saved 3 levels i did it exactly as told here, i saved the first level as a standalone last and it doesn't work i only have 1 level to play. the folders and the size of the game seem like it's 3 levels but it doesn't work. what am i doing wrong?
-
i opened map 3 saved as standalone. i opened map 2 put the properties of trigger zone "if used" on "3", saved as standalone, i opened map 1 put the properties of trigger zone "if used" on "2", saved as standalone.
i started the game, played level 1 and the game ended after i walked on the win zone.

i saved all standalones in the saame folder and there is only one exe. for example in the 3levels i have different skyboxes and in the game folders there are 3 skyboxes in the skybank folder.

what did i do wrong?
http://www.nuncio-rap.de
intel core i5-3570K CPU @ 3.40GHz; 8GB RAM // NVIDIA GeForce GTX560Ti
Pirate Myke
Forum Support
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 26th Apr 2015 01:42
You should have 3 standalone folders when saving them off separately. Save the level you want the player to start in last.
Set up level 3 and save to standalone. Setup level 2 and save to standalone, Setup level 1, then save to standalone.

Go to the standalone folder and run the exe from level you want to start from. When you get to the winzones in that level it should jump you to the next level
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit

nuncio
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 28th Jan 2015
Location: Schleswig Holstein, Germany
Posted: 26th Apr 2015 01:58
when i choose save standalone it always saves in the same folder called "my games". it's always just one *.exe file but i did exactly as you just said but i just have one exe file. do i have to rename the file before i save the next szandalone to have three files or does GG do it?
http://www.nuncio-rap.de
intel core i5-3570K CPU @ 3.40GHz; 8GB RAM // NVIDIA GeForce GTX560Ti
Pirate Myke
Forum Support
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 26th Apr 2015 03:02
GG saves the standalone folder as the level name of the map file. all the folders are save under the mygame folder.

If you want three levels they all need unique names, to be called from the winzones in the ifused fields.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit

Tarkus1971
Audio Media Maker
9
Years of Service
User Offline
Joined: 24th Feb 2015
Location: England, UK
Posted: 26th Apr 2015 09:31
I just do create standalone from the 1st level and when I go into winzone it jumps to next level no problems, ?
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 26th Apr 2015 17:05
I get black meshes in level 2, in standalone. But in editor they looks right.
Using only warehouse stuff from gg stock , player marker, and winzone.
Quote: "
We need to be able to carry items from one level to another and then back again"

I wrote script for that, but unfortunatelly it Works right in test mode, but not in standalone.
Anyway it will figure out in next update, at least I hope so.

To clarify, standalone Works right for me, except the meshes black textured, as pointed above.

3com

Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 8.1 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics

PM
nuncio
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 28th Jan 2015
Location: Schleswig Holstein, Germany
Posted: 27th Apr 2015 07:54
Quote: "If you want three levels they all need unique names, to be called from the winzones in the ifused fields."

i did exactly this (my maps are named "1", "2" and "3") but i have only one *.exe file no matter how many maps i save as standalone... somehow this doesn't work for me
http://www.nuncio-rap.de
intel core i5-3570K CPU @ 3.40GHz; 8GB RAM // NVIDIA GeForce GTX560Ti
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 27th Apr 2015 09:49
In level1 folder should be a "Guru-Game.log" file, please take a look, and see if you've this line in it:

Quote: "_mapfile_loadproject_fpm: mapbank\level2.fpm C:\Users\yourname\Documents\Game Guru Files\My Games\level1\Files S:0MB V:0MB (741,0) "


3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 8.1 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics

PM
Pirate Myke
Forum Support
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 27th Apr 2015 13:55
I will retest this, maybe they changed it.

Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit

nuncio
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 28th Jan 2015
Location: Schleswig Holstein, Germany
Posted: 27th Apr 2015 19:48
thank you, that's very nice. it's still possible that i made something wrong...
http://www.nuncio-rap.de
intel core i5-3570K CPU @ 3.40GHz; 8GB RAM // NVIDIA GeForce GTX560Ti
Pirate Myke
Forum Support
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 28th Apr 2015 08:26 Edited at: 28th Apr 2015 08:37
I am building these multilevels now. And I am watching the folders being written for each level with the level name as the folder name containing the stand alone.
I have 3 levels in this test with 2 winzones on each map pointing to the other two levels I want to jump to.

They are built and I am going to run them now. BRB.

EDIT: Just ran them and they load up each other no problems for me.

Now, also I am not using a complicated level for a test. Also using all stock items. So let me reread thru this thread and see if I missed something.
http://puu.sh/htHk1/9921cba33e.png
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit

nuncio
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 28th Jan 2015
Location: Schleswig Holstein, Germany
Posted: 28th Apr 2015 10:49
hm... then i must have done something wrong. i will try that again to see where my mistake was.
my result was that the folders were right! the size of the folders was right for three levels. i had three skyboxes so everything is alright but i just have one *.exe file. do i have to rename it after the first standalone, naming it "1"?
http://www.nuncio-rap.de
intel core i5-3570K CPU @ 3.40GHz; 8GB RAM // NVIDIA GeForce GTX560Ti
Pirate Myke
Forum Support
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 28th Apr 2015 12:17
each level should have its own exe file in the folder. Starting the level you wanted first should call the others when you get to the winzone.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit

Login to post a reply

Server time is: 2024-05-07 10:46:25
Your offset time is: 2024-05-07 10:46:25