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.
- Place the cycler_sprite entity (for placing the chicken model) and name it as chicken.
- Place 2 env_render entities nearby your cycle_sprite.
- 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).
- 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).
- 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).
- 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.)
- Put ambient_generic somewhere near, with chickens voice, name it "kill" so that it gets triggered when u shoot the func_breakable.
- 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.
Hope to see some chickens soon.