I created a profile in which I use {CMDSEGMENT}to set a variable but I run into some difficulties in how i want to use the variable.
for example:
When I say:
Set Player [Player 1;Player 2;Player 3;Player 4;Player 5; and so on until player 30]
When this command executes, do the following sequence:
Set Text [PlayerVariable] to '{CMDSEGMENT:1}'
next step is:
When I say:
[Player 1;Player 2;Player 3;Player 4;Player 5; and so on until player 30] Defender do something
When this command executes, do the following sequence:
Begin Text Compare : [{CMDSEGMENT:0}] Equals [PlayerVariable]
Press D key and hold for 0.15 seconds and release
Pause 0.1 seconds
Press S key and hold for 0.15 seconds and release
End Condition
What i wanted to accomplish is that only when the correct player number is used the command will be executed.
So far so good and everything works. Sometimes though only one player is available so there is no use to use "player X" in the command, so:
When I say:
Defender do something
I would like the key-press section of the resulting sequence to execute also. That would make "player x" an optional part of the command. First I thought just adding a semicolon behind "player 30" would do the trick, but of course that would be to easy
I think my problem should not be fixed in the command but in the resulting sequence but I can't figure out how to solve this, and wonder if it's even possible.
Any advice would be appreciated.
Greetings,
Richie