robert.briscoe Posted July 31, 2008 Report Share Posted July 31, 2008 Hi, Im trying to make an objective based single player map for hl2 Ep2, and am wondering if I can get some advice on it.So far im trying to make an objective where you have to find and retrieve some prop_physics objects and place them into a box (just as an example). The problem im not sure which is the the best way to do this. I also want to display a messege on-screen telling the player how many objects are left to retrieve. So for example, I have three gas cans I want the player to put into a box, each time a can is put into the box, the can is destroyed, and I want a messege to be displayed saying how many gas cans are left. When all three have been placed in the box I want it to display an objective completed messege. Im currently trying out some stuff with logic compare but im a bit stuck. Any advice is much apreciated! Thanks! Quote Link to comment Share on other sites More sharing options...
m8nkey Posted July 31, 2008 Report Share Posted July 31, 2008 Sounds like a cool gameplay mechanic, exploring and foraging around for stuff you need. It reminds me of grinding in MMOs. I'd like to know how/if you implement this. Quote Link to comment Share on other sites More sharing options...
Pampers Posted July 31, 2008 Report Share Posted July 31, 2008 i would have used a trigger brush and a filter entity to enable a math_counter that triggers different outcomes depending on how many props_physics you have put in the box. It's not really hard to set up and I've done something similar before (putting different objects into a grave to trigger the end of a map ) just ask if you need more info Quote Link to comment Share on other sites More sharing options...
Psy Posted July 31, 2008 Report Share Posted July 31, 2008 Hi, Im trying to make an objective based single player map for hl2 Ep2, and am wondering if I can get some advice on it.So far im trying to make an objective where you have to find and retrieve some prop_physics objects and place them into a box (just as an example). The problem im not sure which is the the best way to do this. I also want to display a messege on-screen telling the player how many objects are left to retrieve. So for example, I have three gas cans I want the player to put into a box, each time a can is put into the box, the can is destroyed, and I want a messege to be displayed saying how many gas cans are left. When all three have been placed in the box I want it to display an objective completed messege. Im currently trying out some stuff with logic compare but im a bit stuck. Any advice is much apreciated! Thanks! Hmm... Okay. I haven't tested this but, theoretically, it should work. The drop-off area 1) Create a trigger_multiple and set it's filter property to can_filter. 2) Create a filter_activator_name, name it can_filter and under Filter Name type prop_can. 3) Name your prop_physic prop_can. (A single can will do for now) The trigger area should only react to the prop_physics and nothing else. Counting 1) Create a math_counter and name it can_counter. 2) Set it's Maximum Legal Value to 3. 3) Go back to the trigger_multiple and add an output like so... onstartTouch > can_counter > Add > 1 4) Add the following outputs to the counter... OnHitMax > prop_can > Kill Displaying the Text 1) Place a game_text and name it message. 2) Type in something like, "YOU ARE WINNAR!!!11!!11!" 3) Go to the math_counter and add the following output... OnHitMax > message > Display Testing It All Out Run the game, open up the console and type developer 2 then developer. You should see a load of text in the top left-hand corner. This will tell you all the inputs and outputs happening in your map. Now, move the can into the trigger brush and you should see some text in the developer console say something like "trigger_multiple - can_counter - Add.1". Move it out and put it back in 2 more times and the can will disappear then a message will appear on the screen. --- I don't have a fucking clue if this works but it should! Quote Link to comment Share on other sites More sharing options...
Campaignjunkie Posted July 31, 2008 Report Share Posted July 31, 2008 For the message, I'd use env_message instead of game_text. That way, you can change the message via text file (or localise to other languages) instead of re-compiling your map with -onlyents. Quote Link to comment Share on other sites More sharing options...
TheMoon Posted August 2, 2008 Report Share Posted August 2, 2008 Also, for triggering new text/message entities every time a can is placed, it's handy to use a logic_case. Simply give your math_counter the following output: OutValue "name of your logic_case" InValue 0.00 It will then send its value evertime it is changed. You need to specify those values in the logic_case entity as Cases (for example, put "1" as value for the Case01 keyvalue etc.) Then you can work with the OnCaseXX Outputs of the logic_case to trigger the desired event at each possible amount of cans placed. For example, you could change the message of a game_text and Display it: OnCase01 game_text AddOutput "message 2 cans left to retrieve" 0.00 OnCase01 game_text Display 0.01 OnCase02 game_text AddOutput "message 1 can left to retrieve" 0.00 OnCase02 game_text Display 0.01 etc pp Quote Link to comment Share on other sites More sharing options...
robert.briscoe Posted August 2, 2008 Author Report Share Posted August 2, 2008 for some reason I cant get the env_messege to display at all, do i need to do something special? even setting up a simple trigger to display them doesnt work Edit nevermind i set up the text file wrong Quote Link to comment Share on other sites More sharing options...
robert.briscoe Posted August 4, 2008 Author Report Share Posted August 4, 2008 Ok now that problem is solved im wondering if you guys can help me with another. Next I want to have a system of spawning the objects in a random place when the map begins. So for example, a gascan can be in one of three predefined places each time the player start a new game. Is this even possible? Quote Link to comment Share on other sites More sharing options...
Sentura Posted August 4, 2008 Report Share Posted August 4, 2008 i remember at one point there being a user made random event generator created by a user; he subsequently created a map where one of four objectives would be initiated at the level beginning. this was for goldsrc, though you could probably have a look in the anomalous materials on the verc boards... if it's still online. Quote Link to comment Share on other sites More sharing options...
robert.briscoe Posted August 4, 2008 Author Report Share Posted August 4, 2008 yeah but how does this goldsrc thing translate over to source? Quote Link to comment Share on other sites More sharing options...
Sentura Posted August 4, 2008 Report Share Posted August 4, 2008 have a look and see if you can find it: http://www.chatbear.com/unity2/653?v=flatold Quote Link to comment Share on other sites More sharing options...
Campaignjunkie Posted August 4, 2008 Report Share Posted August 4, 2008 Use logic_case. Quote Link to comment Share on other sites More sharing options...
JohnSmith Posted August 5, 2008 Report Share Posted August 5, 2008 If i remember well, you need some env_entity_maker (reffering to a single point_template) in all the possible places you want your gascan to spawn. Then you need a logic_auto that trigger a logic_case OnMapStart with PickRandom in the logic_case, you have your 3 cases: g1 - g2 - g3 (for ex).. each one call the appropriate env_entity_maker and make it spawn the gascan. For the gascan you need the prop_physic (named gascan) and a point_template reffering to the prop_physic...This prop will automatically disappear and be spawned randomlly once the map is started...and there you go Quote Link to comment Share on other sites More sharing options...
robert.briscoe Posted August 5, 2008 Author Report Share Posted August 5, 2008 that works great, thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.