Nexus Help - Enable /disable Groups

I want to start off by saying I am a complete noob at coding - I have started looking at javascript, but so far am just looking at the language (like all of them) and scratching my head.  I've read the help manual for the Nexus client and it helps, but I feel I am missing something.

I want to set an alias to enable a group.  I have the Group all set, and the triggers within work fine, but I want to be able to enable / disable them at will.  My understanding was that setting an alias (as a random example BBB) with the Send a Command action client.reflex_disable ('name of the group') would do the trick.  Alas, all I get are the "pardon me?" and "I'm not sure what you mean by that" type of responses.

Is it more complicated than that?  Or am I doing something wrong (the more likely option)?

Any help is sincerely appreciated.

Comments

  • edited February 2016
    "Send a command" is for sending commands to Achaea, as if you'd typed them into the command line, not for executing scripts. You'd either want to use "execute script", or put it into a function and have the alias call the function.

    Also, using the name of the group as the argument for client.reflex_disable won't work. You need to use the name to find the group object, which can be done with client.reflex_find_by_name. You can save the group to a variable first and then use the variable as the argument:
    var groupvariable = client.reflex_find_by_name("group", "name of group");<br>client.reflex_disable(groupvariable);
    Or just use it directly as the argument:
    client.reflex_disable(client.reflex_find_by_name("group", "name of group"));

    For general javascript, I think this is a good place to start.
  • Perfect!  Thank you so much.  And thank you for the W3 link - it looks like exactly what I need.  I like that you can test your scripts right there on the site.
  • TectonTecton The Garden of the Gods
    This is even easier now with Simplified Scripting in the new version of the Nexus client - check out the announce post in-game or the sticky here for more details!
Sign In or Register to comment.