Posted By: Thordendal
Frusterated, guidance please. - 12/25/08 02:10
I'm doing workshop 18 and the c_move is easy. I'm trying to make the key_space decrease the variable NOS.
I've tied them in, I just can't figure out a way to decrease the value of it when I hit the space button.
I think I know what to do, but I can't figure out how to do it without crashing the client.
It's got to have something like this right?
I also believe I need to use while(1), am I right?
I've tied them in, I just can't figure out a way to decrease the value of it when I hit the space button.
Code:
if ((key_space) && (nos >= 1)) c_move (my, vector(15 * time_step, 0, 0), nullvector, GLIDE);
I think I know what to do, but I can't figure out how to do it without crashing the client.
It's got to have something like this right?
Code:
while (key_space) {
energy -= 1;
}I also believe I need to use while(1), am I right?