"What's the command that does X" questions Post them here.
#1
Posted 10 September 2006 - 05:42 PM
Oh, and I'm pinning this. Hope you don't mind. - Lancer-X
I looked at my help file (using the latest Help file and the latest version (2.81c))
and there is nothing about a certain command i heard of before! Some people
used it in thier games, I think!
Is there such a command? or it does not exist yet!
-SmilyMZX
I am at:
Z2 - ZZT forums, NESDEV Forums, SMW Central (Super Mario World)
Other interests:
Museum of ZZT, NESDEV Wiki, Wiki of Weavers (ZZT-related!)
#3
Posted 10 September 2006 - 06:09 PM
I am at:
Z2 - ZZT forums, NESDEV Forums, SMW Central (Super Mario World)
Other interests:
Museum of ZZT, NESDEV Wiki, Wiki of Weavers (ZZT-related!)
#4
Posted 11 September 2006 - 01:26 AM
#5
Posted 11 September 2006 - 01:47 AM
<Exophase> HES STEALING MAH AIRSHIP!!!!!!11111111
#6
Posted 16 September 2006 - 12:38 AM
also what's the thingy for pushing f7 and f8.
infact, what do you do for pressing keys that can't be used by a label?
This post has been edited by Commander Pancake: 16 September 2006 - 12:42 AM
#7
Posted 16 September 2006 - 01:07 AM
2) In 2.81c, you don't need any activation. It's in already. Press F7 to give full lives, health, ammo, bombs, one of each key, coins, and gems; F8 zaps anything one cardinal direction away from the player. (This is probably going out the window in 2.81d, for use only in-editor. But then again, you can save and load games within the editor playthroughs so it's no huge hassle.)
3) Almost all keys can be used by a label or if statement. "keyx" is the general key label, where x is the key. This applies to the alphanumerics, and is case-insensitive. Also, most keys give out a "key_pressed" code. Make a simple loop like this to find them out:
: "lop" * "&key_pressed&" wait 1 goto "lop"
With this knowledge, you can have a check for if "key_pressed" = ### "label".
EDIT: Added key_pressed infos.
<Exophase> HES STEALING MAH AIRSHIP!!!!!!11111111
#8
Posted 17 September 2006 - 08:59 AM
Terryn, on Sep 15 2006, 08:07 PM, said:
I think he might be referring to the key codes that F7 and F8 return, for cheat detection purposes. 65/288
When using KEY_CODE, F7 is code 65 and F8 is 66. When using KEY_PRESSED, F7 is 288 and F8 is 289. A simple way to check and see if they're being pressed it to use the KEYx counter, which uses the KEY_CODE value. See the following:
: "lop" if "key65" = 1 "#f7" if "key66" = 1 "#f8" goto "lop" : "#f7" * "lol ur pressing f7" goto "#return" : "#f8" * "lol ur pressing f8" goto "#return"
If you want a simple way to get key codes like that, make a new board and put a single robot on it with code similar to the following:
: "lop" * "KEY_CODE: &key_code&; KEY_PRESSED: &key_pressed&" goto "lop"
Test it and start pressing keys and it'll return the appropriate values. Remember, if you want to use the KEYx counters, KEY_CODE is the one you want.
#9
Posted 17 September 2006 - 09:20 AM
<Exophase> HES STEALING MAH AIRSHIP!!!!!!11111111
#10
Posted 27 September 2006 - 06:52 PM
Terryn, on Sep 10 2006, 08:47 PM, said:
Is there a way for a robot to modify the volume of the sound effects channel? Or should I ask, is there a counter for it?
#11
Posted 27 September 2006 - 10:50 PM
#12
Posted 28 September 2006 - 09:34 AM
#13
Posted 28 September 2006 - 10:13 AM
IOW, if the version string is before whatever mzx this change will be added, the volume affecting part of interpretation code will be skipped.
#14
Posted 28 September 2006 - 04:02 PM
Spectere, on Sep 17 2006, 08:59 AM, said:
Well here's something I've been wondering on a similar subject, is it possible to use this feature to -completely- disable f7-f8 cheating and/or to assign these keys to do something else?
#15
Posted 28 September 2006 - 10:33 PM
Koji, on Sep 28 2006, 05:13 AM, said:
IOW, if the version string is before whatever mzx this change will be added, the volume affecting part of interpretation code will be skipped.
OH YA!
#16
Posted 28 September 2006 - 11:48 PM
savagegreywolf, on Sep 28 2006, 11:02 AM, said:
Spectere, on Sep 17 2006, 08:59 AM, said:
Well here's something I've been wondering on a similar subject, is it possible to use this feature to -completely- disable f7-f8 cheating and/or to assign these keys to do something else?
Unless you keep a per-cycle tab on keys, ammo, lives and all of that stuff you can't negate F7 cheating. You can punish it easily (by detecting a key color not used in your game, most often) but making it as if it were never there is troublesome.
F8 is the same way. Punishing is easy for this as well, as long as you have no situations where the player is surrounded by spaces. Simply check for that condition then. It's easier if spaces do not exist on the board at all; any presence of a space means that F8 was used. Countering is YEAARGH.
As a result, punishment is far easier.
Thankfully for you, Exo looks like he'll pull cheats at normal runtime. They'll still work in editor test runs, since leaving them in is helpful for debugging, but not normally.
As for the other point, with cheating disabled in 2.81d you can use F7 and F8 as a normal key, and make it do special things like most other keys.
<Exophase> HES STEALING MAH AIRSHIP!!!!!!11111111
#17
Posted 29 September 2006 - 03:42 PM
#18
Posted 29 September 2006 - 08:02 PM
IF ANY [color] [thing] [param] "label"
and its converse
IF NO [color] [thing] [param] "label"
<Exophase> HES STEALING MAH AIRSHIP!!!!!!11111111
#20
Posted 06 October 2006 - 07:28 PM
Terryn, on Sep 28 2006, 11:48 PM, said:
F8 is the same way. Punishing is easy for this as well, as long as you have no situations where the player is surrounded by spaces. Simply check for that condition then. It's easier if spaces do not exist on the board at all; any presence of a space means that F8 was used. Countering is YEAARGH.
As a result, punishment is far easier.
Thankfully for you, Exo looks like he'll pull cheats at normal runtime. They'll still work in editor test runs, since leaving them in is helpful for debugging, but not normally.
As for the other point, with cheating disabled in 2.81d you can use F7 and F8 as a normal key, and make it do special things like most other keys.
Cool. Unfortunately what this means is I can't have like in my global bot a label that gets called immediately when some fool presses F7/F8 in my game without constantly scanning for those keypresses. Which would be a pain if I decided to have that bot do something else...
#21
Posted 12 October 2006 - 02:06 AM
#22
Posted 12 October 2006 - 04:02 PM
like uuuuh a counter called "cheatkeys" if it's set to 0 (or 1 or whatever) f7 and f8 do NOTHING AT ALL.
Such a function could be added easily by whoever makes the next version if the point it made again, but till then.
#23
Posted 12 October 2006 - 08:46 PM
What would be the point of adding that counter, since it's already been stated in this thread that cheats will be pulled from executing at runtime in the next version
<Malwyn> Yes, yes. Don't worry I'd rather masturbate with broken glass than ask you for help again. :(
#25
Posted 17 October 2006 - 06:01 PM
Right now I have a very long and drawn out method for cheat prevention, and even though it works it keeps me from testing that board without deactivating the robot that does the test. In short, my solution != elegant, and if it could be done much easier I'd appreciate it, also it'd be nice to be able to detect the cheat before going to the board in question. I'm worried less about some lazy fool who cheated way back when and gets punished and can't go any further in my game and more worried about the unsuspecting fool who accidentally hit F7 and didn't realize it (yes, I've actually done this by accident), then an hour and a half into my game gets stuck because of that and can't go back to before they hit the key because they've saved over themself, or have to go back and test one of twenty saves to find one that doesn't have a full key set.
I might give the test for a key that isn't used in my game a shot though, though I'm wondering is it possible to do that with the Global Robot and like a :justentered label so it at least tests it at the beginning of every board?
Before someone says it's moot, it has been said that you will still be able to use F7 and F8 in the editor, so.
I just like punishing cheaters
This post has been edited by savagegreywolf: 17 October 2006 - 06:04 PM
#26
Posted 17 October 2006 - 11:21 PM
#27
Posted 17 October 2006 - 11:23 PM
<Malwyn> Yes, yes. Don't worry I'd rather masturbate with broken glass than ask you for help again. :(
#28
Posted 18 October 2006 - 09:19 PM
#29
Posted 21 November 2006 - 12:08 AM
Quick question: is there a command or set of commands that will erase all fired bullets on a board?
I feel stupid for asking this because it seems really simple, but would you be so kind as to remind me how to do this?
Yoinked into the topic we MADE for this sort of thing...
#30
Posted 21 November 2006 - 12:17 AM
<Malwyn> Yes, yes. Don't worry I'd rather masturbate with broken glass than ask you for help again. :(