Author Topic: Use Key (v1.5)  (Read 6570 times)

Since it's client-sided, you could make a quick little spawn room that you have to download and map the key before you can progress through to the server. Like say a door that can be only opened by using the use key.

Then you could have a message display when you try to click to open the door that tells you that you need to download this in order to activate things.

edit: oh man this is the best client sided thing ever I love it

marry me port
« Last Edit: April 12, 2012, 10:10:21 PM by IkeTheGeneric »

Is there a range pref we could have with this? How far is the range currently?
Because it would do really well as a replacement to the insane activate distance we have currently (insane as in unrealistic)

I realized I had to enable it. xD

loving port is always stealing the mods that i want to try and fail at making
:(

-textsnip-
Well, maybe, but in my option it's more fun to have doors booth open when clicked and when used with the Action button. This has two cons:
  • In case you have this add-on enabled, you can take the advantage, and it's not unfair, because anybody could download this.
  • Laughting at noobs begging that how do you do that.

Because it would do really well as a replacement to the insane activate distance we have currently (insane as in unrealistic)
You can modify onActivate's use range.

Seriously, there should just be a mod like this that replicates the onActivate key.

Updated to v1.5.

Changelog:
  • Fixed JVS activation.
  • Changed the "Activate JVS" preference to "Activate Condition". This can be set to None, to process onActivate on no bricks, JVS for JVS content bricks or All for all bricks.
  • Added a preference for range.
  • Added a preference for how often you can press the Use Key.


Note about the class/script support thing: Doesn't support named objects (which is dumb why shouldn't it)

Here's some nice support code for method detection and object-oriented calls:
Code: [Select]
function SimObject::hasMethod(%this,%name)
{
return isFunction(%this.getName(),%name) || isFunction(%this.class,%name) || isFunction(%this.getClassName(),%name);
}
function SimObject::call(%this,%func,%a,%b,%c,%d,%e,%f,%g,%h,%i,%j,%k,%l,%m,%n,%o,%p,%q,%r,%s,%t,%u,%v,%w,%x,%y,%z)
{
if(!%this.hasMethod(%func))
{
error("SimObject::call - No method '" @ %func @ "' exists for this object.");
return;
}
for(%it=0;%it<26;%it++)
{
%val = "%" @ getsubstr("abcdefghijklmnopqrstuvwxyz",%it,1);
%val = eval("return" SPC %val @ ";");
if(%val $= "")
{
break;
}
%args = %args $= "" ? "\"" @ expandEscape(%val) @ "\"" : %args @ ",\"" @ expandEscape(%val) @ "\"";
}
return eval("return " @ %this.getID() @ "." @ %func @ "(" @ %args @ ");");
}
Feel free to throw that in anywhere you feel it's appropriate. Should be entirely eval-safe (as in user input shouldn't be able to eval random code through it, but I didn't exactly test heavily)

You have to fix this add-on loving up the akimbo pistols.

I already tried with default installation and it forgets up my akimbo pistols on any server.

use key is left akimbo pistol, and normal fire is right akimbo pistol.

good job, I like this

Is it possible to include a sound when pressing the use key? If your going to add one, i would suggest using the Half-Life 2 use key sound.

Is it possible to include a sound when pressing the use key? If your going to add one, i would suggest using the Half-Life 2 use key sound.

The use key in Half-Life 2 only makes a sound when you try to use something you can't use (e.g. a wall or nothing).

You have to fix this add-on loving up the akimbo pistols.

I already tried with default installation and it forgets up my akimbo pistols on any server.

use key is left akimbo pistol, and normal fire is right akimbo pistol.

In that case it will trigger anything in your left hand. Why he decided to use alttrigger instead of just sending a commandtoserver to raycast i dunno.

Seems like a well made add-on.


Does this mean we can open doors and whatnot without unequipping a weapon?