How to make a model Killable/Breakable

A Tutorial for GoldSrc Engine

This tutorial teaches how to make a model vanish when you shoot at it, like chickens of Italy.

If you are reading this tutorial, I am considering that you already have the basic knowledge of how triggering of entity works.

Entities we're gonna use:-

  • Cycler_sprite:- Used for placing a 3D model in the map.
  • Env_render:- Used for changing the render properties for the target.
  • func_breakable:- Used for making a brush/block breakable, can be used to initiate the trigger when you shoot at it.
  • enc_shooter:- Used for shooting Gibs (pieces of something, here feathers) in the air.
  • ambient_generic:- Used for playing a sound.
  • trigger_multiple:- Used for triggering an event when you touch this brush based entity.

Procedure

  1. Place the cycler_sprite entity (for placing the chicken model) and name it as chicken.
  2. Place 2 env_render entities nearby your cycle_sprite.
  3. In the properties of one of the env_render entity, put
    Name - kill,
    target - chicken,
    render mode - additive,
    fx amount - 0. (now when we trigger "kill", it changes the render property of its target "chicken" and make it invisible).
  4. In the property of other env_render, put
    Name - respawn,
    target - chicken,
    render mode - normal,
    fx amount - 255. (when "respawn is triggered, it changes the render property of its target "chicken" and make it visible).
  5. Make a func_breakable brush entity (size and shape similar to your model) right over the cycler_sprite, in its properties, put
    target on break - kill (on breaking this, it triggers "kill" env_render and makes the model disappear),
    material type - flesh,
    gib direction - relative to attack,
    render mode - texture (some light)(this makes the func_breakable invisible and only model appears).
  6. Put a env_shooter entity above the cycler_sprite, name it "kill" (so that it gets triggered when u break/shoot at the func_breakable), choose feather model in "model" field. (on being triggered it shoots feathers in the air.)
  7. Put ambient_generic somewhere near, with chickens voice, name it "kill" so that it gets triggered when u shoot the func_breakable.
  8. Put a brush in a place away from this place (probably where the players spawn), such that a player passes through this brush while walking around. Tie this to trigger_multiple. put
    Target - "respawn" in the property. (when the player passes through this, it triggers "respawn" evn_render and the chicken appears again.)




What is happening here



  • When you shoot at the model in the map, you are actually shooting at the invisible func_breakable that is coinciding your model. This func_breakable calls all the entities named "kill".
  • The env_render named "kill" on being called, targets the "chicken" (cycler_sprite) and changes its Render Mode to Additive and FXamount to 0, thus making it invisible.
    Simultaneously, Ambient_generic and env_shooter which are also named "kill" play the sound and shoot the feather gibs in the air.
  • When the player spawns and passes through the trigger_multiple, env_render "respawn" is triggered and it changes the Render Mode and Fxamount of cyclcer_sprite back to normal and 255 respectively and thus makes it appear again.
  • func_breakable gets reset as the round starts.
you can use the same way to make breakable wine glasses, bottles etc.

Example Prefab

That's all for this time.
Hope to see some chickens soon.
Happy Mapping.

Posts

  • Glock18 avatar
    Glock18 username pic Joined 5y ago
    Offline
    2,068 points Ranked 2528th
    28 medals 1 legendary 3 rare
    • Returned 5000 times Medal icon
    • Returned 1000 times Medal icon
    • Reached 50 subscribers Medal icon
    • Submitted 20 Maps Medal icon
    • Winter Worlds Mapping Contest Entrant Medal icon
    • Journey to the Center of the Earth Entrant Medal icon
    4y
    Very clear tutorial. I wouldn't have understood it entirely, but the prefab set-up just topped it off -- 10/10.

    10

    Need a mapper? PM me!
  • Ring-A-Ding Rampage avatar
    Ring-A-Ding Rampage username pic Joined 7y ago
    In Extremis
    4,518 points Ranked 1132nd
    74 medals 9 legendary 20 rare
    • Submitted 60 Sprites Medal icon
    • Thanked 500 submitters Medal icon
    • 15+ Entries! GameBanana’s Christmas Giveaway 2015 Medal icon
    • Submitted 100 Skins Medal icon
    • Reached 100 subscribers Medal icon
    • 15+ Entries! GameBanana’s Christmas Giveaway 2016 Medal icon
    Ring-A-Ding Rampage avatar
    Ring-A-Ding Rampage
    (づ。◕‿‿◕。)づ
    4y
    > **Posted by Akshit** > > **Posted by KaranMohadkar** > > > **Improvements:** > > > > - Add Source file as an example, so people can download , thats the best way to learn ! > > will do that as soon as i'm back home, also a flowchart diagram is coming up. This was made in a hurry. Wow, flowcharts! :D.

    10

    I'mma deck you in the schnoz. avatar
    Mantra
    I'mma deck you in the schnoz.
  • Akshit Saklani avatar
    Akshit Saklani Joined 6y ago
    Offline
    24,578 points Ranked 187th
    48 medals 3 legendary 8 rare
    • 15+ Entries! GameBanana’s Christmas Giveaway 2015 Medal icon
    • 15+ Entries! GameBanana’s Christmas Giveaway 2016 Medal icon
    • 15+ Entries! GameBanana’s Christmas Giveaway 2017 Medal icon
    • GameBanana’s Christmas Giveaway 2015 Day Seven Winner! Medal icon
    • GameBanana’s Christmas Giveaway 2015 Day Thirteen Winner! Medal icon
    • 25 posts awarded Exemplary Feedback Medal icon
    4y
    > **Posted by KaranMohadkar** > **Improvements:** > > - Add Source file as an example, so people can download , thats the best way to learn ! will do that as soon as i'm back home, also a flowchart diagram is coming up. This was made in a hurry.
    Fall 7 times, stand up 8! avatar
    Mantra
    Fall 7 times, stand up 8!
  • KaranMohadkar avatar
    KaranMohadkar Joined 6y ago
    Offline
    9,448 points Ranked 507th
    18 medals 2 rare
    • Returned 1000 times Medal icon
    • 6 years a member Medal icon
    • 1-5 Entries! GameBanana’s Christmas Giveaway 2014 Medal icon
    • Reached 1,000 Points Medal icon
    • Reached 2,500 Points Medal icon
    • 1 post awarded Exemplary Feedback Medal icon
    4y
    **Improvements:** - Add Source file as an example, so people can download , thats the best way to learn !

    9

    Trying To Learn Mapping :P

Embed

Share banner
Image URL:
HTML embed code:
BB embed code:
Markdown embed code:

Credits

Original Authors
Akshit Saklani
Akshit Saklani Joined 6y ago
Offline
24,578 points Ranked 187th
48 medals 3 legendary 8 rare
  • 15+ Entries! GameBanana’s Christmas Giveaway 2015 Medal icon
  • 15+ Entries! GameBanana’s Christmas Giveaway 2016 Medal icon
  • 15+ Entries! GameBanana’s Christmas Giveaway 2017 Medal icon
  • GameBanana’s Christmas Giveaway 2015 Day Seven Winner! Medal icon
  • GameBanana’s Christmas Giveaway 2015 Day Thirteen Winner! Medal icon
  • 25 posts awarded Exemplary Feedback Medal icon
Author

Submitter

Akshit Saklani avatar
Akshit Saklani Joined 6y ago
Offline
24,578 points Ranked 187th
48 medals 3 legendary 8 rare
  • 15+ Entries! GameBanana’s Christmas Giveaway 2015 Medal icon
  • 15+ Entries! GameBanana’s Christmas Giveaway 2016 Medal icon
  • 15+ Entries! GameBanana’s Christmas Giveaway 2017 Medal icon
  • GameBanana’s Christmas Giveaway 2015 Day Seven Winner! Medal icon
  • GameBanana’s Christmas Giveaway 2015 Day Thirteen Winner! Medal icon
  • 25 posts awarded Exemplary Feedback Medal icon

Akshit Saklani
Creator
Sign up to access this!
Sign up to access this!
Sign up to access this!

Game

Sign up to access this!

Category

Details

Difficulty Level
Intermediate

Attributes

Share

  • Share on Reddit
  • Share on Twitter
  • Share on Facebook
  • Share on Google+

Stats

  • 4,323 Views
  • 4 Posts
  • 4y Submitted
  • 2y Modified

Scores

87 bScore
9.8 Rating

7 voters

Sign up to access this!

More from Submitter

WiPs by Submitter

More Mapping Tutorials

bcp.crwdcntrl.net tracking pixel