Reply to Re: Local variable problem
If you don't have an account, just leave the password field blank.
So I can't reliably run a loop in the main procedure? (does it get interrupted when it's hit?)
I added the &stunduration = 20 in the hit procedure to test it. In reality it's going to be a global variable that acts like a constant throughout the game. So, if I don't add it in the hit procedure and I use the goto command in the hit procedure, hitting it 20 times in a row will actually subtract one from the duration each time, overwriting the timer mechanic of the main procedure. I hope that makes sense :/ I think I'll try it with the sp_custom key feature which seems to be new (??).
EDIT: I tested it and hitting an enemy indeed ends the main procedure. Something to keep in mind if you want to do anything in that procedure I guess. Still leaves me with the problem that I can not use variables in the hit procedure that I declared in the main procedure. Weird stuff. Guess I'll follow Rob's suggestion and just live with the potential exploits
I added the &stunduration = 20 in the hit procedure to test it. In reality it's going to be a global variable that acts like a constant throughout the game. So, if I don't add it in the hit procedure and I use the goto command in the hit procedure, hitting it 20 times in a row will actually subtract one from the duration each time, overwriting the timer mechanic of the main procedure. I hope that makes sense :/ I think I'll try it with the sp_custom key feature which seems to be new (??).
EDIT: I tested it and hitting an enemy indeed ends the main procedure. Something to keep in mind if you want to do anything in that procedure I guess. Still leaves me with the problem that I can not use variables in the hit procedure that I declared in the main procedure. Weird stuff. Guess I'll follow Rob's suggestion and just live with the potential exploits






