Ok so I was Curious on how to get the correct use of GS1 Keydown with any key… Such as when you press “o” It will make you hurt or display a message…
I have soo far
if (keypressed && keycode(79))
{ message FORK
}
^ that being the only code without errors I can think of.
Please help.
The Semicolon is not required unless more than one action command is added, none the less, the issue still goes on with it.
When I go in the level with the object, I can press any key, not just “o”, Any ideas of how I may change the conditions?
It’s one fucking character, and it’s always a failsafe. Put it in no matter what. Next we’ll be hearing that brackets are useless around flags, and etcetera.
Try weird shit with your scripts, you’ll end up with weird results. Just do it the way everyone does.
Now to get to the real shit,
if (keypressed && keycode(79))
{ message FORK;
}
What you have here is the flag to check IF A KEY IS PRESSED, and the variable for a keyboard code (or whatever the fuck it’s called. I atleast know the logic behind it.)
Literally the client is thinking: Do this if the key is pressed, keycode(o). It doesn’t know what to do with that keycode so it just ignores it and it becomes useless. While that’s still partially correct, but what you want is a double flag here. You want to check if the keyboard is being used, and you want to check if a specific key is being pressed as a flag.
if (keypressed && keydown2(keycode(o),true))
{ message FORK;
}
I believe this is what you wanted.
Again, close but no cigar. Good luck!