Scripts / use doors to port to another map

Author
Message
Super Masgamer
Audio Media Maker
6
Years of Service
User Offline
Joined: 2nd Dec 2018
Playing: Quad Damage
Posted: 15th Dec 2018 01:28
does anybody know how to use a door to port to another map? when I press E to open a door I want it to take me to another map
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 15th Dec 2018 02:07
I would try this script, but you may have to merge the door script with it to do what you want.

Scripts by smallg
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, Screen resolution 1680 x 1050.

Attachments

Login to view attachments
Super Masgamer
Audio Media Maker
6
Years of Service
User Offline
Joined: 2nd Dec 2018
Playing: Quad Damage
Posted: 15th Dec 2018 02:33
thank you ill look into it
Super Masgamer
Audio Media Maker
6
Years of Service
User Offline
Joined: 2nd Dec 2018
Playing: Quad Damage
Posted: 15th Dec 2018 02:35
oh that teleports you around your map. I want to be able to load into a new map. I tried editing a door using the same properties as the winzone but i cant get it to work
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 15th Dec 2018 02:47
One moment then.
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, Screen resolution 1680 x 1050.

Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 15th Dec 2018 02:49 Edited at: 17th Dec 2018 01:14
Here is the one I modified to use the jumptolevel command.

I just tested this script and it still works.

One thing I forgot to mention is you will need a hidden winzone in your game with the name of the destination maps. This is so the other levels get written to the stand alone.

My bad. It has been a while since I used this script.
Also Put the name of the door in that doors ifused field for this script to work.
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, Screen resolution 1680 x 1050.

Attachments

Login to view attachments
Super Masgamer
Audio Media Maker
6
Years of Service
User Offline
Joined: 2nd Dec 2018
Playing: Quad Damage
Posted: 15th Dec 2018 03:09
so how would i use this? i want to be able to go up to the door press E to open in and when i do it port me to a new map
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 15th Dec 2018 03:28
The script has a lot of comments in it for instruction. It is the same one as the first one, except it uses the jumptolevel command instead.

So up at the to around line 50 is where you enter the map name you want to call.
If you only want one choice then change this line
local max_dest = 4

To

local max_dest = 1

There is a lot. start from the top of the script and get things setup. That text file is the instructions.

I have a tennant out of water and Irate. I will be back in a bit.



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, Screen resolution 1680 x 1050.

Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 15th Dec 2018 06:16
Sorry. Are you making headway with this?
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, Screen resolution 1680 x 1050.

Super Masgamer
Audio Media Maker
6
Years of Service
User Offline
Joined: 2nd Dec 2018
Playing: Quad Damage
Posted: 15th Dec 2018 18:58
I'm still working on it. Lua doesn't seem that hard at all but idk why I can't get any of my codes to work
Super Masgamer
Audio Media Maker
6
Years of Service
User Offline
Joined: 2nd Dec 2018
Playing: Quad Damage
Posted: 15th Dec 2018 19:39
why wouldnt this work?

Super Masgamer
Audio Media Maker
6
Years of Service
User Offline
Joined: 2nd Dec 2018
Playing: Quad Damage
Posted: 15th Dec 2018 19:50
Quick update because this doesn't make any sense to me. So I took the door script to start from scratch and made a copy of it. I renamed it to doorport.lua and have NOT changed a single line of code. It is literally a copy and paste with just a name change. Applied that to my door and now the door won't even open. Nothing has changed except the name of the script from door.lua to doorport.lua . The text doesn't even come up that says Press E to open.... -_- i think i just need to take a break for the day because i'm getting my ass kicked by a door lmao -_-
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 15th Dec 2018 20:46
If the script is called "doorport.lua" then the _init and _main functions in the script must be changed to match, i.e. the should be "doorport_init" and "doorport_main".

Hope that makes sense.
Been there, done that, got all the T-Shirts!
PM
Super Masgamer
Audio Media Maker
6
Years of Service
User Offline
Joined: 2nd Dec 2018
Playing: Quad Damage
Posted: 15th Dec 2018 23:37
ah yeah, I forgot about that. That fixed the copy and paste problem but what i want to do still doesn't work. I don't know why it's not really simple. Is it the game engine?
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 16th Dec 2018 00:05
You can't change level in test mode, so it could be that you just aren't seeing any noticeable effect with the command... If the door is opening and you have set the correct level name in the 'ifused' field for the door it is likely working but you need to create the standalone and run that to actually make it load the level.
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 16th Dec 2018 00:13
As smallg said in test mode it wont load a new level. Instead it tells you what level it should load in the prompt area at the bottom of the screen.

Primary Desktop:
i7 7700,k NV1070 8GB, 16GB 3200mhz memory, 1x 2TB Hybrid, Win10.

Secondary Desktop:
i5 4760k, NV960 2GB, 16GB 2333mhz memory, 1x 2TB Hybrid, Win10.

Laptop:
i3, Intel 4000 series graphics, 6GB memory, 1x 500gb HDD, Win8.1.
Super Masgamer
Audio Media Maker
6
Years of Service
User Offline
Joined: 2nd Dec 2018
Playing: Quad Damage
Posted: 16th Dec 2018 19:17
yeah i tried stand alone as well. I knew about not being able to do it in test mode. Thanks for the answers though !
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 17th Dec 2018 01:12 Edited at: 17th Dec 2018 01:39
I just tested this script and it still works.

One thing I forgot to mention is you will need a hidden winzone in your game with the name of the destination maps. This is so the other levels get written to the stand alone.



My bad. It has been a while since I used this script.
Also Put the name of the door in that doors ifused field for this script to work.

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, Screen resolution 1680 x 1050.

Login to post a reply

Server time is: 2024-12-22 14:19:50
Your offset time is: 2024-12-22 14:19:50