how does env_global work?
I just want to set it to a yes or no value in one level, and have it activate something in the next level depending on the value, but i havent been able to find a decent tutorial on how to do so. All ive found is references to using "a logic_auto in the next level that checks for the state set by the env_global." Nowhere has explained how to do this though.
Help would be appreciated muchly!
Each map has an env_global with the same name, "initial state" set to off and "global state to set" set to my_global_state. The logic auto in the second map has "global state to read" set to my_global_state and fires an outut that turns on a light.
The first map has a button than on pressed turns on the env_global and then after a delay uses a point_clientcommand to launch the second map.
What am I doing wrong?
I've just spent a long time on getting transitions and globals to work. I had to try to implement counters getting passed through to maps... that wasn't so easy as the counter on env_globals doesnt seem to work so I had to do it myself.
What you say your doing sounds ok.
I've attached 2 maps that I've used to test all this, maybe you can see from them what you might be doing wrong...
Just load up map1 and then use the button in that level to set the global, then walk into the black wall and it will link to map2 and pass the global to it. The button in map2 will display if the global is ON or OFF...
HTHs,
EDIT: Oh, just thought... you're saying your using a point_clientcommand to change maps. Maybe thats the problem as thats just the equivalent of trying 'map xxx' in the console. Not sure, but that isnt really doing a correct transition is it? Its probably not preserving the globals that way. But I havent tested it...
Rob.
Can anyone help me with either of these problems?
Valve uses a trigger_transition and the elevation transition.
And you can bring props with you if you are within the area or the trigger. That's how many people got the companion cube from testchmb 17 to testchmb 18.
That is one of the main reasons Valve didn't use trigger_changelevel.
So learn to script .nut files for transition and use trigger_transition.
Hmm, the way I was using it, that didnt effect me.
I have the user travelling through a vactube at the time they change level, and then at the point I want to change maps, I firstly teleport them to a separate 'box' that is completely black, 128x128 size and just has a trigger_changelevel in it. This was so that the user was oriented better and so I could position him correctly in the new map.
(I guess for your map, before you teleport them to the changelevel box, you could make them drop any item that they were carrying?)
As for the loading screen, my plan was to release the map in a 'mod', and then include my own loading screens using 'materials\console'.
Rob.
thabks teleportig the player to a box first should helpstop props getting taken through ( and help player alignment issue)
@spongylover
yeah id use a nut file, but because im trying to make a lobby, and also need ev_globals, i figured id use trigger_changelevels instead.
EDIT: Just in case anyone comes searching for information on env_globals or trigger_changelevels, I'd like to put in some information that I havent seen anywhere else. Instead of using trigger_changelevels, it seems you can use a point_clientcommand and tell it to run the command "map yourmapnamehere" (but DO NOT use quotation marks). This changes the level while preserving env_global states and to my mind at least, is a ton easier than setting up trigger_changelevels.