Point_clientcommand

Tutorial collection, comprehensive listings on main site.

Point_clientcommand

Postby Tutorial on Tue Mar 07, 2006 9:00 pm

category
General Half-Life 2/Entities

description
This entity will allow console commands to be changed without using the actual developer console.

keywords
point, client, command, point_clientcommand.

With this entity you can set a client command without having to use the console.

Think, you wanna make a "video" ingame like in HL1 when the soldiers catches Gordon. You probably won't like to have the HUD shown (you just want the screen like before getting the suit or when using cl_drawhud 0), well the player wouldn't like to have to write these commands to get everything well. So you can have the entity point_clientcommand doing it for you..

Setting up the entity

Here I'll use this entity to restart a game in Counter-Strike Source.

Let's begin.

Create a room, put the player start entity (info_player_terrorist) create a button and put anywhere the entity point_clientcommand!

In the last entity give that a name... I'll use a simple one: "Command" (without the quotes). Go to your button properties and Add an output.


Setting the Output

My outputnamed Use OnPressed
Tartgets entities named Put the name of our target. In this case "Command".
Via this input Use Command "The Input "Command" will tell the target (point_clientcommand) to use a console command.
With a parameter override of I just want to restart the game... for it use "mp_restartgame 1" (without the quotes). note: The number 1 is the delay before reseting the game (in seconds)...

If you want you can use a delay or mark Once Only.

Image

Now run the map and its done!

Example Map

I hope you understand it.

Darklight
- Don't send PM's to this user -
Tutorial
Not A Real User
 
Joined: Sun Mar 06, 2005 11:00 pm

Postby Fate™ on Sat May 06, 2006 10:25 pm

this isnt very helpful. The point_clientcommand entity isnt viewable. You have to make a trigger_once brush or a button or something and make an output tied to the point_clientcommand.

Like for example im trying to make time slow down when i walk through a trigger brush. so ive got my brush infront of the player, with an output to the point_clientcommand saying OnStartTouch - nameofclientcommandentity - command and additional parametres of host_timescale 0.3

then a logic_timer to make it work for so long and a sound for when the slow mo kicks in.
User avatar
Fate™
1337 p0st3r
1337 p0st3r
 
Joined: Mon Jun 06, 2005 8:00 pm
Location: England

Postby Alminie on Sat May 06, 2006 10:52 pm

Fate™ wrote:this isnt very helpful. The point_clientcommand entity isnt viewable. You have to make a trigger_once brush or a button or something and make an output tied to the point_clientcommand.

aahhh look at the tut again he does use a button to use the client_command :P
Image
User avatar
Alminie
Sir Post-a-lot
Sir Post-a-lot
 
Joined: Mon Dec 19, 2005 3:55 am

Postby Fate™ on Sun May 07, 2006 11:05 am

Oh yeah .. oopsie xD
User avatar
Fate™
1337 p0st3r
1337 p0st3r
 
Joined: Mon Jun 06, 2005 8:00 pm
Location: England

Postby Evil Sponge on Tue May 16, 2006 4:49 pm

This just solved my old problem with how to start a map in black and white without having to type "mat_yuv 1" into the console.
ya I just used a trigger around the info_playerstart and set the map to "fade in" just incase there was a delay. its pretty obvious I've not done any good in hammer, no real progress, but the point_clientcommand and the output/input system's giving me ideas.
I know its an old tutorial but thanks for having it here.
Evil Sponge
Dumpling
Dumpling
 
Joined: Wed Aug 24, 2005 6:53 pm

Return to Tutorials

Who is online

Users browsing this forum: No registered users