trigger_changelevel in CO-OP?
Quote from YM_Industries on September 18, 2011, 4:44 amHello everyone!
I wish to use a smooth level transition in co-op (I.E. One where the players don't have to be in the chamber things. I can guarantee that the players will both be in the trigger_transition area at the transitioning time so no need to worry about bugs that might cause. (Unless their cheaters, in which case they deserve to die)
Has anyone got this working?
As a side note, what are the info_transition_entry and info_transition_exit for? Does anyone know? They are currently undocumented.
EDIT: When passing through the trigger_changelevel the console says: "In level transition:"
It doesn't say anything else...
EDIT #2: It spams this the whole time while in the trigger area. Looks to be about once per frame.
Hello everyone!
I wish to use a smooth level transition in co-op (I.E. One where the players don't have to be in the chamber things. I can guarantee that the players will both be in the trigger_transition area at the transitioning time so no need to worry about bugs that might cause. (Unless their cheaters, in which case they deserve to die)
Has anyone got this working?
As a side note, what are the info_transition_entry and info_transition_exit for? Does anyone know? They are currently undocumented.
EDIT: When passing through the trigger_changelevel the console says: "In level transition:"
It doesn't say anything else...
EDIT #2: It spams this the whole time while in the trigger area. Looks to be about once per frame.
Quote from MasterLagger on September 19, 2011, 11:08 pmWell, maybe you could look inside an co-op exit instance to see what it does. I'm not saying to do exactly what it does, but find out what makes the level transitions work. I did that to find out how to spawn co-op players without falling though a tube.
Well, maybe you could look inside an co-op exit instance to see what it does. I'm not saying to do exactly what it does, but find out what makes the level transitions work. I did that to find out how to spawn co-op players without falling though a tube.
My Work
[spoiler]Maps:
Revenge of the Angry Turrets
Capture the Cube [Co-op]
Capture the Cube 2 [Co-op]
TPWEGTH Sample Map
Aperture Aquatic Testing Center
Aperture Aquatic Testing Center 2
Aperture Time Testing Center
ML's Halloween Trick - 1000 downloads!
ML's Halloween Treat
ML's Combination - 1000 downloads!
ML's Jailbreak Labyrinth
ML's Tricky Teamwork [Co-op]
WIP:
"Capture the Cube 3"
Workshop Maps Link: http://steamcommunity.com/profiles/76561198008890579/myworkshopfiles/[/spoiler]
Quote from spongylover123 on September 19, 2011, 11:40 pmIn portal 2 valve never use a trigger change level, instead they use a script or elevators, that's how they have the aperture laboratories logo
In portal 2 valve never use a trigger change level, instead they use a script or elevators, that's how they have the aperture laboratories logo
Quote from YM_Industries on September 20, 2011, 6:15 amSo... I'm assuming that I can probably just do whatever mappers did in other multiplayer games... L4D had coop, didn't it? What did they do for map transitions?
So... I'm assuming that I can probably just do whatever mappers did in other multiplayer games... L4D had coop, didn't it? What did they do for map transitions?
Quote from ChickenMobile on September 20, 2011, 6:27 aml4d uses a info_changelevel not a trigger_transition. It figures out what area is the safe room using landmarks. I think you can still use a trigger_transition in L4d but it is not recommended.
Portal 2 coop doesn't use a trigger_transition, it uses a transition script in order to figure what map comes next etc. Valve made separate .bsps anyway because of the level choosers in the hub.
Here's what you should do:
- Create your own custom transition script
- edit the default instances to suit and saveas your custom instance
- Split the map into appropriate sections so the map isn't too laggy
- Pack the script into your vpk or bsp, then release
l4d uses a info_changelevel not a trigger_transition. It figures out what area is the safe room using landmarks. I think you can still use a trigger_transition in L4d but it is not recommended.
Portal 2 coop doesn't use a trigger_transition, it uses a transition script in order to figure what map comes next etc. Valve made separate .bsps anyway because of the level choosers in the hub.
Here's what you should do:
- Create your own custom transition script
- edit the default instances to suit and saveas your custom instance
- Split the map into appropriate sections so the map isn't too laggy
- Pack the script into your vpk or bsp, then release
Quote from KenJeKenny!? on September 20, 2011, 7:11 amchickenmobile wrote:l4d uses a info_changelevel not a trigger_transition. It figures out what area is the safe room using landmarks. I think you can still use a trigger_transition in L4d but it is not recommended.Portal 2 coop doesn't use a trigger_transition, it uses a transition script in order to figure what map comes next etc. Valve made separate .bsps anyway because of the level choosers in the hub.
Here's what you should do:
- Create your own custom transition script
- edit the default instances to suit and saveas your custom instance
- Split the map into appropriate sections so the map isn't too laggy
- Pack the script into your vpk or bsp, then release
Yes but i've read posts from alot of people saying you should also do this in SP maps... however a trigger_changelevel works fine in SP.
I'm almost positive there is a easier workaround...maybe through a trigger and server-side console commands?
Portal 2 coop doesn't use a trigger_transition, it uses a transition script in order to figure what map comes next etc. Valve made separate .bsps anyway because of the level choosers in the hub.
Here's what you should do:
- Create your own custom transition script
- edit the default instances to suit and saveas your custom instance
- Split the map into appropriate sections so the map isn't too laggy
- Pack the script into your vpk or bsp, then release
Yes but i've read posts from alot of people saying you should also do this in SP maps... however a trigger_changelevel works fine in SP.
I'm almost positive there is a easier workaround...maybe through a trigger and server-side console commands?
Quote from YM_Industries on September 20, 2011, 8:04 amchickenmobile wrote:l4d uses a info_changelevel not a trigger_transition. It figures out what area is the safe room using landmarks. I think you can still use a trigger_transition in L4d but it is not recommended.Portal 2 coop doesn't use a trigger_transition, it uses a transition script in order to figure what map comes next etc. Valve made separate .bsps anyway because of the level choosers in the hub.
Here's what you should do:
- Create your own custom transition script
- edit the default instances to suit and saveas your custom instance
- Split the map into appropriate sections so the map isn't too laggy
- Pack the script into your vpk or bsp, then release
Thanks Chicken, but the problem is, I'm making a map where I want a play again function. I don't want the players to start at the begining of the map again, I want to have a seperate spawn point for those who have used the play-again to those playing for the first time. My plan was that I would just use a trigger_changelevel with a landmark. This trigger would start disabled and be enabled when the player pressed the restart button. They would then walk (actually fall) into the trigger and it would restart the map but keeping them in the same place. Because the trigger is disabled by default it would not get stuck in a loop. All my plans have now been ruined. Looks like I'll have to make 2 maps now (1 for first time, 1 for restarted)
(info_changelevel doesn't seem to be in Portal 2! EPIC FROWNY :C
EDIT: I might be able to get away with using some sort of env_global system... TO THE WIKI!
EDIT 2: Thought I could bypass all that script changing and make an easier install using a point_changelevel turns out... YOU CAN'T! So that's interesting... Is a script REALLY the only way? I suppose I could use a server command... Hmm, but will is preserve env_global settings?
EDIT 3: So I implement a server command changelevel system only to realise that the trigger activating it all was disabled. It probably would've worked!
Portal 2 coop doesn't use a trigger_transition, it uses a transition script in order to figure what map comes next etc. Valve made separate .bsps anyway because of the level choosers in the hub.
Here's what you should do:
- Create your own custom transition script
- edit the default instances to suit and saveas your custom instance
- Split the map into appropriate sections so the map isn't too laggy
- Pack the script into your vpk or bsp, then release
Thanks Chicken, but the problem is, I'm making a map where I want a play again function. I don't want the players to start at the begining of the map again, I want to have a seperate spawn point for those who have used the play-again to those playing for the first time. My plan was that I would just use a trigger_changelevel with a landmark. This trigger would start disabled and be enabled when the player pressed the restart button. They would then walk (actually fall) into the trigger and it would restart the map but keeping them in the same place. Because the trigger is disabled by default it would not get stuck in a loop. All my plans have now been ruined. Looks like I'll have to make 2 maps now (1 for first time, 1 for restarted) ![]()
(info_changelevel doesn't seem to be in Portal 2! EPIC FROWNY :C
EDIT: I might be able to get away with using some sort of env_global system... TO THE WIKI!
EDIT 2: Thought I could bypass all that script changing and make an easier install using a point_changelevel turns out... YOU CAN'T! So that's interesting... Is a script REALLY the only way? I suppose I could use a server command... Hmm, but will is preserve env_global settings?
EDIT 3: So I implement a server command changelevel system only to realise that the trigger activating it all was disabled. It probably would've worked! 
Quote from baca25 on September 20, 2011, 8:35 amWhat I did, was I opened the exit instance, figured out that the script changed the level, realized I dont know much about scripts, so I found what triggered the script, deleted the script, and added a point_servercommand in its place, and triggered it from where the script was triggered. Now its my prefab. So I dont know exactly if you are trying to use the exit elevators or not, but if your not, I always use a coop_manager with a point_servercommand.
What I did, was I opened the exit instance, figured out that the script changed the level, realized I dont know much about scripts, so I found what triggered the script, deleted the script, and added a point_servercommand in its place, and triggered it from where the script was triggered. Now its my prefab. So I dont know exactly if you are trying to use the exit elevators or not, but if your not, I always use a coop_manager with a point_servercommand.
Mapping Since May 21, 2011
Quote from ChickenMobile on September 20, 2011, 8:58 amSo did you want the players to start again after you have finished the campaign (you can close Portal 2 and open again and you can start at new spawn)? Or did you mean that you want an option for the players to start again after they have finished without returning to the hub or exiting the game?
The first would be overly complex and is impossible without saving and reading from some file, which is only available if you can create game code (i.e. modding). We all know that modding is not currently available for Portal 2 so this is practically out of the option.
For the second you can just make a logic_coop_manager that would teleport the players to the preferred spawn. For the bot spawns you can deactivate and activate the wanted spawn (known as the active spawn), as seen in the airlocks. I would also incorporate some kind of fade here, so it doesn't looks as sloppy when you restart.
Remember to reset all your entities so then the puzzle isn't already completed when you pass through again. You can use point_templates to re-spawn objects which aren't spawned by cube spawners etc.
So did you want the players to start again after you have finished the campaign (you can close Portal 2 and open again and you can start at new spawn)? Or did you mean that you want an option for the players to start again after they have finished without returning to the hub or exiting the game?
The first would be overly complex and is impossible without saving and reading from some file, which is only available if you can create game code (i.e. modding). We all know that modding is not currently available for Portal 2 so this is practically out of the option.
For the second you can just make a logic_coop_manager that would teleport the players to the preferred spawn. For the bot spawns you can deactivate and activate the wanted spawn (known as the active spawn), as seen in the airlocks. I would also incorporate some kind of fade here, so it doesn't looks as sloppy when you restart.
Remember to reset all your entities so then the puzzle isn't already completed when you pass through again. You can use point_templates to re-spawn objects which aren't spawned by cube spawners etc.
Quote from YM_Industries on September 20, 2011, 9:35 amThanks again Chicken, I didn't think of logic_coop_manager, mainly because it seems to do so many different things and I haven't looked them all up. I have achieved success using an env_global to enable and disable spawns in conjunction with a logic_auto. Thanks though!
EDIT: I actually don't think I could use a logic_coop_manager after looking it up. But the switching spawn points on and off should do nicely.
EDIT 2: I apologise for being so secretive and confusing you all! I really don't want to give anything away about my upcoming map!
Thanks again Chicken, I didn't think of logic_coop_manager, mainly because it seems to do so many different things and I haven't looked them all up. I have achieved success using an env_global to enable and disable spawns in conjunction with a logic_auto. Thanks though!
EDIT: I actually don't think I could use a logic_coop_manager after looking it up. But the switching spawn points on and off should do nicely.
EDIT 2: I apologise for being so secretive and confusing you all! I really don't want to give anything away about my upcoming map!


