Author Topic: enable disable category  (Read 5396 times)

innovations

  • Guest
enable disable category
« on: July 26, 2016, 03:22:04 PM »
Right now we have categories, which are useful only for organization.  What I would like to do is to have the ability to have a command action that could enable or disable an entire category of commands.  So let's say I am making a profile for a space game in which I can both fly a ship and walk around a space station and do things I would like to be able to turn on the spaceship commands when I am in the spaceship and turn them off when I am on the space station.  so in other words

disable category spaseship
enable caegory spacestation

enable category spaceship
disable category spacestation.

A command like 'jump' might have entirely different meanings in each category.

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2825
Re: enable disable category
« Reply #1 on: July 26, 2016, 05:26:12 PM »
What you are wanting is to disable a set of commands to have those commands then replaced by a different set of same-named commands on the fly.  That's more than just disabling a particular category (also, there's no way to simply disable even a single command on the fly as it stands).

What you would probably be better off doing is creating different profiles.  One profile for the space station and one profile for the space ship.  Then, have each of those profiles link to a profile that contains their common commands.

So, 'jump' in the space ship profile will have one set of actions and 'jump' in the space station profile will have a different set of actions.  They both link to a third, common profile that has, 'open spotify' or 'tell me i'm handsome' in it ;).

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4761
  • RTFM
Re: enable disable category
« Reply #2 on: July 27, 2016, 01:00:59 AM »
I can understand that you'd like this sort of thing for organizational purposes, but you can make a command do different things depending on the state of a variable to achieve the same functionality, if that's what you require.

E.G.:

Docking Disengaged
Code: [Select]
Set Text [CommandContext] to 'SpaceShip'
Docking Engaged
Code: [Select]
Set Text [CommandContext] to 'SpaceStation'
Jump
Code: [Select]
Begin Text Compare : [CommandContext] Equals 'SpaceShip'
    Press Left Shift+J keys and hold for 0,06 seconds and release
Else If Text Compare : [CommandContext] Equals 'SpaceStation'
    Press Space key and hold for 0,06 seconds and release
End Condition