Please or Register to create posts and topics.

Add a custom key/button

PreviousPage 3 of 4Next

aw i thought someone said that using quotes would break the game. that must have been somewhere else

EDIT: new problem, the quotes now crash hammer on loadup of the VMF

Just when I think I understand the system, it changes on me.

Oh I didn't know you were trying to implement those into hammer entities. Well, I don't know if there is a way to do It without the vmf crashing.

My YouTube Channel: https://www.youtube.com/user/Camben24
Aperture Science: We do our science asbestos we can!

Edit the VMF in a text editor and remove those particular quote marks. Then Hammer should be able to work with it again.

Falsi sumus crusto!

Looks like it would be easier to delete the command and save the vmf after saving and compiling the map into the bsp, and then re-input the command before compiling in the future

Just when I think I understand the system, it changes on me.

update: hammer suddenly decided that it is having none of that binding crap and is preventing me from compiling with the quotations

Just when I think I understand the system, it changes on me.

Here's a workaround to allow sending quoted commands - write them in a VScript which can have escaped quotes.
Just do something like this:

Code: Select all
SendToConsole("bind g "ent_fire @special_relay_g Trigger"");
SendToConsole("bind b "ent_fire @special_relay_b Trigger"");

Save in scripts/vscripts, and in your map use RunScriptFile with the path to your script (from vscripts/) to run it when needed. You'll need to pack the script into your map.

My stuff:
[spoiler]- BEE2 Addons | (BEE2)
- Hammer Addons
Maps:
- Crushed Gel
- Gel is Not Always Helpful[/spoiler]

Some time ago I discovered also a vscripting way of introducing quotes. It's a bit more convoluted than TeamSpen's but this is also useful to change certain keyvalues of an entity when you must use use quotes in the output:

Code: Select all
commanduse <- @"""+use""";

function UseBinding()
{
   EntFire( "@clientcommand", "Command", "bind e " + commanduse, 0, 0 );
}

You'll need a point_clientcommand entity (named "@clientcommand")as well as a logic_script to execute this function.

Notice the space after the letter e in the part: "bind e " (that space is important to separate the letter e from the command "+use")

Fracture, I know you hate scripts, however this one is very simple, and an effective workaround to using quotes in Hammer.

ImageImageImageImageImageuseful tools and stuff here on TWP :thumbup:
[spoiler]ImageImageImageImageImage[/spoiler]

Is there any way to make this work on the portal 1 engine? Because I don't think they have vscripts in that game but I don't know.

My YouTube Channel: https://www.youtube.com/user/Camben24
Aperture Science: We do our science asbestos we can!

Well, I have never tried. However, even though the logic_script entity doesn't seem to exist in Portal, I guess you could try to pass functions through the entities themselves (via the "Entity Scripts" property). Like for example the point_clientcommand entity, give it a go ;)

ImageImageImageImageImageuseful tools and stuff here on TWP :thumbup:
[spoiler]ImageImageImageImageImage[/spoiler]

scripts can be pakratted, right?

Just when I think I understand the system, it changes on me.
PreviousPage 3 of 4Next