Ammo boxes

Credits

Submitter
  • P3: Peasant
    Points: 14,437
  • C1: Member
  • A5: Veteran
    Account Age: 5 years
RobinTM (Creator/Co-creator)
Studio
Half Life Storm
Key Authors
Robin

Rating

9.6/10
Based off 6 rating(s)

Additional Info

Genre
Mapping
Difficulty Level
Intermediate

Stats

Post Count
16
ViewCount
3,659
Date Added
4 years ago
Date Modified
4 years ago

Start off by opening up a small test map and put a propdynamic in there and name it itembox. Then open up the model browser and choose a hl2 box from there like so:

After place a weaponc4 where you want the bomb to spawn when they open the box and name it c4, remember you can change what you want to spawn by just changing the model like to a weaponak etc. Like so:

Thirdly place a pointTemplate under the weaponc4 and name it c4_Spawn, then go to the template one option and select c4 from the drop down list. Like so:

Finally add a button in nodraw texture where the handle is on the box, tick the flag dont move. Then in flags option add the following inputs:

On Pressed c4_spawn Force spawn

On Pressed item_box setanimation Open

On Pressed item_box setanimation Close After a delay of 2 seconds

Save and your done compile and test, remember if you want to spawn another weapon like anAK use weaponak instead of c4 an m4a1 would be weaponm4a1 and so on.

Thank you and please do not copy this tutorial to any other site without my permission.

Here is a map to see how its done if you find the tutorial confusing. ammo_box.vmf

Thank you, please comment and assess.

  • You must be a member

Comments

    • P1: Beggar
      Points: 28
    • C1: Member
    • A4: Graduate
      Account Age: 4 years

    Great tut.

    Pros:this is how i learned Cons:clean it up a bit Notes: CHANGE THIS: Then in flags option add the following inputs TO THIS: Then in flags option add the following "outputs"

    Bananite
    • P1: Beggar
      Points: 357
    • E1: Helper
      EF: 13
    • C1: Member
    • A5: Veteran
      Account Age: 4 years

    "I don't think you can with ammo on its own not entirely sure."

    you can, its done on a surf map somewhere

    Thank you NUMBER for the aweso
    • P2: Drudge
      Points: 6,780
    • E3: Tutor
      EF: 63
    • C1: Member
    • A5: Veteran
      Account Age: 5 years

    Nice pictures. Good tutorial. Just could use more HTML. Like a heading and bits that people could miss out to be a bit bigger or bold. Even in a different font.

    Mapping Imp
    • P3: Peasant
      Points: 14,437
    • C1: Member
    • A5: Veteran
      Account Age: 5 years

    Well you could add a weapon, and take off smart edit and add ammo with a value according to the gun. So when the box opens a gun comes out instead. I don't think you can with ammo on its own not entirely sure.

    I HAZ PS3
    • P3: Peasant
      Points: 14,437
    • C1: Member
    • A5: Veteran
      Account Age: 5 years

    No it wouldnt, it would show the box.

    I HAZ PS3
    • P5: Peddler
      Points: 171,300
    • E2: Guide
      EF: 20
    • C5: Admin
    • A5: Veteran
      Account Age: 5 years
    Jonny-higgins

    Pros: Very good, clear easy to understand Cons: will show up as red error signs for those who don't own hl2, but do own css. Improvements: none Notes: Good work :D

    Admin Bananite
    • P1: Beggar
      Points: 46
    • C1: Member
    • A5: Veteran
      Account Age: 5 years

    Thanx for tut helpful :)

    Nibbler
    • P4: Worker
      Points: 37,669
    • E1: Helper
      EF: 12
    • C1: Member
    • A5: Veteran
      Account Age: 5 years

    Pros: Fairly easy to read, quite to the point. Cons: Only example is C4, no mention of being able to use other weapons. Poor use of space. Improvements: Better English Fix the cons

    <3 <3 <3
    • P3: Peasant
      Points: 18,631
    • E1: Helper
      EF: 2
    • C1: Member
    • A5: Veteran
      Account Age: 5 years

    Nice Tutorial Robin. Explained well , clear and easy good job.

    I'm Backz :)
  • You must be a member