How to make a model Killable/Breakable

A Tutorial for Goldsource 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.

Sign up to access this!
  • Glock18 avatar
    Glock18 username pic Joined 5y ago
    Offline
    2,128 points Ranked 2491st
    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!
    URL to post:
  • Ring-A-Ding Rampage avatar
    Ring-A-Ding Rampage username pic Joined 8y ago
    Moderator
    In Extremis
    2,378 points Ranked 2219th
    75 medals 10 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
    (づ。◕‿‿◕。)づ
    5y
    > **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

    Ode to Code avatar
    Mantra
    Ode to Code
    URL to post:
  • Akshit Saklani avatar
    Akshit Saklani Joined 6y ago
    Offline
    24,646 points Ranked 192nd
    49 medals 3 legendary 9 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
    5y
    > **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!
    URL to post:
  • KaranMohadkar avatar
    KaranMohadkar Joined 6y ago
    Offline
    9,496 points Ranked 518th
    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
    5y
    **Improvements:** - Add Source file as an example, so people can download , thats the best way to learn !

    9

    Trying To Learn Mapping :P
    URL to post:

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,646 points Ranked 192nd
49 medals 3 legendary 9 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,646 points Ranked 192nd
49 medals 3 legendary 9 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+
  • 4.4k Views
  • 4 Posts
  • 5ySubmitted
  • 3yModified

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