Jump to content

Source mapping/entity advice needed


robert.briscoe

Recommended Posts

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!

Link to comment
Share on other sites

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 :P) just ask if you need more info :-D

Link to comment
Share on other sites

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. :P

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! :v

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 :-D

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...