OK, albiet this is probably a strange question, please bear with me.
I need my keypad to be in two modes, normal and Player vs. Player mode.
I've used some of Nick's great ideas and have the following example:
The 0 keypad key sends KP10 (bear with me) to the world. My alias KP* picks it up.
I have a function called keypadAction that does the following:
Sub keypadAction(a,b,c)
Dim key
key = CInt(trim(c(1)))
world.send Keypad(key, currKeypad)
End Sub
OK, so Keypad(x,y) is an array that has the various actions that I want to have happen. So far so good. Here's an example for Keypad 0 (which is the 10th element in my array, hence the KP10)
Keypad(KEY0, NORMAL) = "look"
Keypad(KEY0, PVP) = "actionDsl"
Now comes the nasty bit. If I'm in normal mode, Keypad 0 key will do a "look". If I'm in PVP mode, I *want* the value sent through world.send to be processed as an alias, so that I can set an alias called "actionDSL" and run a script.
Problem is that it won't work. It *seems* as if because I'm running a current alias (KP*) and calling a script, that I can't go ahead and have another alias run... or world.send doesn't run through the aliases. I haven't actually searched for that particular issue, so I guess I should.. but help? In some cases, when I'm in PVP mode, I'm going to need to run scripts based on the keypad key I've pressed, rather than just a simple send to the world... and I want it to be nice and reconfigurable, hence why I don't hardcode things.
Thanks!
I need my keypad to be in two modes, normal and Player vs. Player mode.
I've used some of Nick's great ideas and have the following example:
The 0 keypad key sends KP10 (bear with me) to the world. My alias KP* picks it up.
I have a function called keypadAction that does the following:
Sub keypadAction(a,b,c)
Dim key
key = CInt(trim(c(1)))
world.send Keypad(key, currKeypad)
End Sub
OK, so Keypad(x,y) is an array that has the various actions that I want to have happen. So far so good. Here's an example for Keypad 0 (which is the 10th element in my array, hence the KP10)
Keypad(KEY0, NORMAL) = "look"
Keypad(KEY0, PVP) = "actionDsl"
Now comes the nasty bit. If I'm in normal mode, Keypad 0 key will do a "look". If I'm in PVP mode, I *want* the value sent through world.send to be processed as an alias, so that I can set an alias called "actionDSL" and run a script.
Problem is that it won't work. It *seems* as if because I'm running a current alias (KP*) and calling a script, that I can't go ahead and have another alias run... or world.send doesn't run through the aliases. I haven't actually searched for that particular issue, so I guess I should.. but help? In some cases, when I'm in PVP mode, I'm going to need to run scripts based on the keypad key I've pressed, rather than just a simple send to the world... and I want it to be nice and reconfigurable, hence why I don't hardcode things.
Thanks!