Create a working Vending machine

Credits

Submitter
  • P1: Beggar
    Points: 500
  • C1: Member
  • A5: Veteran
    Account Age: 6 years
hedbanger999 (Creator/Co-creator)
Authors
n/a
n/a

Rating

9.0/10
Based off 3 rating(s)

Additional Info

Genre
Other/Misc
Difficulty Level
Intermediate

Stats

Post Count
8
ViewCount
3,729
Date Added
5 years ago
Date Modified
-

Step1: Vending Machine-

Create a propstatic then adjust it's location in your map. Then open it's properties and set world model to "models/props/csoffice/Vending_machine.mdl" without the "" or if you've managed a custom mdl use that.

refer to screenshot1

Step2: Bottle & Dispenser-

Now we want to make the bottle and dispenser so that it shoots out of the machine but also making it look realistically and not getting in anyones way. (well thats really up to you.)

Well this is quite simple. Take your entity tool and create a env_shooter. Lets name it "shooter1" without the "".

Now set these settings:

Gib Direction: Direction in which you want your bottle to fire Number of Gibs: Set it to 1 so that no more than one fires out of the machine ;p Gib Angles: Orientation of the spawned bottle (standing up, on its side, etc) Gib Velocity: Speed in which the bottle is fired Course Varieance: slight variance in direction Gib Life: Set it to how many seconds you want your bottle to exist in your map (I set to 10) Model: Set this to models/props/csoffice/Waterbottle.mdl or your own custom mdl Material Sound: Set to NONE as the bottle will create it's own sound. Simulate: Set to Physics

Now under the flags tab check "Repeatable" so that it will fire more than just once.

refer to screenshot2

Now for our button. Create a brush using the tools/toolsinvisible material/texture covering your vending machines buttons. Tie it to the entity func_button.

Set up as so:

Sounds: Up to you I didnt add any. Delay Before Reset: Again up to you but I set it to 2 (seconds)

Under the flags tab check off "Don't move" and "Use Activates (which should already be checked by default)"

Under the Output tab create this line

OnPressed | shooter1 | shoot | 0.00 | No

Now when you press your button it will activate the envshooter firing off a bottle (if you placed the envshooter correctly with your tweaked settings it should pop out of the vending machines mouth realistically)

refer to screenshots 3 and 4

Good luck and enjoy.

Tats...

P.S. Thank you Samejima motivating me to find alternative and cleaning this up.

Edit: This is a new version of VendingMachine after playing with it a bit more I found this to be much simpler and add the effect I wanted. Hope it helps...

NOTE: I did NOT write this tutorial, it brought here for your own convenience. It was origanlly from HL2world.com.

Although, if you have an questions or comments, i can help you, my xfire is hedbanger999.

I hope this helped!

  • You must be a member

Comments

    • P1: Beggar
      Points: 55
    • C1: Member
    • A4: Graduate
      Account Age: 3 years

    Thx alot for this guide, but can i get the bottle to disappear in some reason?

    The Sleeping "Beauty"
    • P1: Beggar
      Points: 742
    • C1: Member
    • A5: Veteran
      Account Age: 4 years

    Pros: tutorial made well Cons: i didn't understand how make the output and if i have to put something else in shooter after the putput

    Bananite
    • C1: Member
    • A5: Veteran
      Account Age: 5 years

    Hmmm lol I only had the gun model..anyway for it too spit to weapon_(weapon name) ?

    BEEFCAKE
    • C1: Member
    • A5: Veteran
      Account Age: 5 years

    Instead of bottles I had a gun..so now it spits out guns lol thanks for the help making it really appreciate it

    BEEFCAKE
    • C1: Member
    • A5: Veteran
      Account Age: 5 years

    Put it how to do sounds. I found out myself, but I really wanted to know before I didn't know how.

    I Glocked Your Ass Into Last W
    • P1: Beggar
      Points: 749
    • C1: Member
    • A5: Veteran
      Account Age: 5 years

    Sweet thnx alot ^^

    God's seen campy bean.
    • P3: Peasant
      Points: 14,437
    • C1: Member
    • A5: Veteran
      Account Age: 5 years

    Nice, this will help me to understand more in hammer

    I HAZ PS3
    • P4: Worker
      Points: 26,490
    • C1: Member
    • A6: Elder
      Account Age: 6 years

    I was wondering how to do this..

    SRT-4 RuLeZ
  • You must be a member