Go Back   Steam Users' Forums > Steam Tool Discussions > Source Level Design

Reply
 
Thread Tools Display Modes
Old 04-25-2012, 05:06 PM   #1
kami790
 
 
 
Join Date: Apr 2009
Reputation: 457
Posts: 557
Can you execute a config file as a trigger in a map?

Basically, I'm trying to make it so instead of just using the trigger_changelevel, I make it execute a config file which changes the level for me. Is there a way to do this?
kami790 is offline  
Reply With Quote
Old 04-26-2012, 12:00 AM   #2
Karlos_Modder
 
 
 
Join Date: May 2007
Reputation: 28
Posts: 819
Point_servercommand

With your trigger output the following
OnTrigger > point_servercommand > Command > exec <name_of_config>

and your done..
Karlos_Modder is offline   Reply With Quote
Old 04-26-2012, 12:48 AM   #3
ICantShoot
 
 
 
Join Date: Jan 2005
Reputation: 415
Posts: 5,903
Just be carefull with point_servercommand. It may corrupt your vmf if you place it incorrectly and you have to manually with text editor to remove it.
ICantShoot is offline   Reply With Quote
Old 04-26-2012, 01:05 AM   #4
Karlos_Modder
 
 
 
Join Date: May 2007
Reputation: 28
Posts: 819
Really, ive never encounted a problem with servercommand. Im current making a map that repeatedly uses a servercommand. In one instance it trigger 5 different cvar in 0.2sec of each other.
Karlos_Modder is offline   Reply With Quote
Old 04-26-2012, 01:13 AM   #5
ICantShoot
 
 
 
Join Date: Jan 2005
Reputation: 415
Posts: 5,903
I haven't had issues either, but Valve Developer wiki warns about it.

Quote:

This entity can corrupt the vmf file if used improperly. If your map crashes when you open it, this could be the problem. Open the vmf file in notepad and press Ctrl+F. Search for command and remove that line. One way in which this entity can become corrupted is by enclosing commands that contain spaces in quotation marks. In some other contexts this is necessary to make sure the computer does not interpret a space as the end of the command, but here it will cause an immediate map crash on attempting to compile or open the map. The map can be repaired by removing the superfluous quotation marks in Notepad or with a tool such as PSPad. Attempting to open the map in Object Viewer may fail but yield a useful error message that gives the exact line of code to be edited, referred to as a "malformed expression."
ICantShoot is offline   Reply With Quote
Old 04-26-2012, 01:25 AM   #6
Karlos_Modder
 
 
 
Join Date: May 2007
Reputation: 28
Posts: 819
Ah, i guess it might even mean if you copy/paste an entity (prop, ai, env, ect..ect) then change it to a point_servercommand, i found some parameters stay and you need to manually edit the entity by turning smart edit off.
Karlos_Modder is offline   Reply With Quote
Old 04-26-2012, 04:26 PM   #7
kami790
 
 
 
Join Date: Apr 2009
Reputation: 457
Posts: 557
Quote:
Originally Posted by Karlos_Modder View Post
Point_servercommand

With your trigger output the following
OnTrigger > point_servercommand > Command > exec <name_of_config>

and your done..
Thanks

Last edited by kami790: 04-26-2012 at 04:51 PM.
kami790 is offline   Reply With Quote
Reply

Go Back   Steam Users' Forums > Steam Tool Discussions > Source Level Design


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -7. The time now is 07:23 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site Content Copyright Valve Corporation 1998-2014, All Rights Reserved.