Change level/transition help

Need Help? The Day isnt going so well on the Mapping front?
Post Reply
ShinobiRAGE
Vertex
Vertex
Posts: 5
Joined: Fri May 08, 2009 6:43 pm

Change level/transition help

Post by ShinobiRAGE »

Well I am trying to figure out how the change levels but I am just lost with it and even tried an example map on sdknuts. Also is there a way to trigger something from a map before to the next map?
fug4life
Beta Tester
Beta Tester
Posts: 4093
Joined: Mon Dec 11, 2006 10:35 am

Post by fug4life »

Some one help this guy with the specific details please.

Basiaclly off the top of my head, you can either use a point_server command with an AddOutPut changelevel mapname delay input.

(I think I dont have my computer handy I'm away traveling at the mo).

Or a Trigger_changelevel and I think info_landmark.

Also there is a level transition entity but, I really can't remember how to use with out opening hammer and looking sorry.

I hope someone will help you, if not I'll try check the point_server command and give you an example later.
'I would probably smarten up before you meet Violet'.
'She has zero tolerance for idiots'.

fug's Obsidian files
fug's Obsidian clips
Obsidian wiki
Obsidian Map Database
KON_Air
prop_static
prop_static
Posts: 96
Joined: Thu Oct 16, 2008 10:41 am

Post by KON_Air »

Brush function trigger change level is the only one, you can use it as a volume trigger or call it via input. You must have a landmark even if you don't actually need it. Not all of the point entities carry over to the next map but stuff (physics, npcs, etc) transfered via landmarks keep their properities.
fug4life
Beta Tester
Beta Tester
Posts: 4093
Joined: Mon Dec 11, 2006 10:35 am

Post by fug4life »

Thanks KON_air, Brush based is good to get the transitions working.

If you still want a simple map change without all the transition jazz,
brush based isn't the only way, as I mentioned in my first post, For my de_dust 1&2 mapadd scripts.
I used a point_server command & a point_trigger.

Here's a peek how (without showing all of the entities properties) I got de_dust to change to de_dust 2, like this:

Code: Select all

"point_servercommand"

            "targetname" "mapchange"
           
"point_trigger"
      
"OnStartTouch" "mapchange,Command,changelevel de_dust2,52,1"
Though I have to credit W0rf0x (he works most of these things out).
'I would probably smarten up before you meet Violet'.
'She has zero tolerance for idiots'.

fug's Obsidian files
fug's Obsidian clips
Obsidian wiki
Obsidian Map Database
ShinobiRAGE
Vertex
Vertex
Posts: 5
Joined: Fri May 08, 2009 6:43 pm

Post by ShinobiRAGE »

Alright Thanks! I give it a shot, still kinda lost though.
fug4life
Beta Tester
Beta Tester
Posts: 4093
Joined: Mon Dec 11, 2006 10:35 am

Post by fug4life »

Basically to use Kon_air's way

Creat a box (brush) with the tools\trigger texture. whilst the brush is highlighted/selected press CTL+T and this will/should select the 'Tie to entity' function then from the object properties change the entity type to a trigger_changelevel (I think).

Set the entity up and make sure you give a name of the info land mark.

Then in your second map add your info land mark.

Sorry I haven't used hammer for a few months now and I never really used this entity set up, so I'm guessing a little.

To use the point server command like I show'd, you just need to trigger an Output like the 'Onstarttouch' one I used to the point_server command.

So anything that fires an output will do.
'I would probably smarten up before you meet Violet'.
'She has zero tolerance for idiots'.

fug's Obsidian files
fug's Obsidian clips
Obsidian wiki
Obsidian Map Database
ShinobiRAGE
Vertex
Vertex
Posts: 5
Joined: Fri May 08, 2009 6:43 pm

Post by ShinobiRAGE »

Well is it isn't much trouble for you can you post an image of the properties of the entities, that is what confusing me.
fug4life
Beta Tester
Beta Tester
Posts: 4093
Joined: Mon Dec 11, 2006 10:35 am

Post by fug4life »

Hi, Sorry but I need to know which you are attempting? The brush based trigger_changlevel or the point_server command.

For the brush based (trigger_changelevel),

You need to create your brush (this brush needs to be textured with the tools/trigger texture).
and then press ctl+t to get the 'tie to entity' Your brush will now be an entity, either double click on it or right click on it and select properties.

In the properties box you'll have a dropdown menu in the top left, browse this menu until you get to trigger_changelevel.

As for the rest the Valve wikki should explain everything:

Place an info_landmark in both maps to mark the same location in both maps.

To fire events in the next level, use the OnChangeLevel output to turn on an env_global in the current level. Create a logic_auto in the next level that checks for the state set by the env_global.

To control which entities go through the level transition, create one or more trigger_transitions and give them the same name as the landmark. Any entities within the trigger_transition(s) will go to the next map.

Level transitions must be two-way. That is to say, there must be a trigger_changelevel in the next level that points to the current level, as well as the trigger_changelevel taking the player to the next level. If a one-way level transition is desired, simply make this second trigger_changelevel inaccessible to the player (and/or check the "Disable Touch" flag).

The info_landmark must be in the player's PVS when the level change is triggered. If it is not, the level change will fail. Both info_landmark entities must have the same name.

Although the info_landmark should be in a corresponding position in both levels, the two trigger_changelevel brushes must NOT be in the same place in each level. If they are, you will be thrown into an infinite loop, endlessly ping-ponging back and forth between the two levels.

Availability
This brush-based entity is available in: all Source games.

In code it is represented by class CChangeLevel, defined in triggers.cpp.

Keyvalues
targetname
<target_source> Name.
map
<string> New Map Name.
landmark
<target_destination> Landmark Name.
Flags
2 : Disable Touch
4 : To Previous Chapter
Inputs
ChangeLevel
Cause the level change. Use this when triggering the level change with a button, etc.
Outputs
OnChangeLevel
Fired when the level changes.

Retrieved from http://developer.valvesoftware.com/wiki ... hangelevel




And as for the point_server command option just add a pointserver_command and name it: mapchange and have a Trigger once brush based entity send an output like this.


"OnTrigger" "mapchange,Command,changelevel oc_nameofyourmap,10,1"

(the 10 value is the time delay, the 1 value is just to fire the output once).

If this is too much you need to learn how to create triggers, and tie brushes to entities and learn a bit about the Output/Input system (I/O).


Sorry I can't give anymore as I'm miles (9000 quite possibly more) away from my computer and hammer.

G'luck
'I would probably smarten up before you meet Violet'.
'She has zero tolerance for idiots'.

fug's Obsidian files
fug's Obsidian clips
Obsidian wiki
Obsidian Map Database
User avatar
Fishoto
Vertex
Vertex
Posts: 8
Joined: Thu Aug 11, 2011 7:42 pm

Re: Change level/transition help

Post by Fishoto »

Done that , but still when i switch map (AND I HAVE TO STAY IN THE PLACE FOR LIKE AGES before being transfered) when i transfer , AI DISABLED.... omg... and why don't you put some screenshot? the valve page is the hardest thing on this planet to understand.. used "trigger_changelevel" and landmark...all i could understand from this horrible guide
User avatar
TESLA-X4
Former Developer
Former Developer
Posts: 570
Joined: Wed Jul 01, 2009 3:26 pm
Location: $Recycle.Bin

Re: Change level/transition help

Post by TESLA-X4 »

sv_changeleveldelay (iirc). Change that to zero to test transitions.
Apparently, Valve can't make games beyond the number 2.
I think the only time we'll get a Source SDK code update is when it starts having purchasable hats integrated, i.e. hatconomy.

Please do not make assumptions you are not knowledgeable enough to make - that just backfires on yourself.
Tick me off, and I'll be sure to give you the golden treatment. Haven't you heard? Silence is golden.
Post Reply