It's normally used in a "does not equal" context, but yes, you could check to see very much like that.
For an example, in DIYCE2 code it would look like this
|
Source code
|
1
|
{ name = "Custom: Shadow Pulse", use = melee and (EnergyBar2 >= 20) and (g_lastaction ~= "Shadow Pulse") },
|
There are plenty of examples in both this thread and in the thread for DIYCE2. Search for it, and you will find it.