dMZX Forums: "What's the command that does X" questions - dMZX Forums

Jump to content

  • (8 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

"What's the command that does X" questions Post them here.

#1 User is offline   smilymzx 

  • Those Goodie-Goodies!
  • PipPipPip
  • Group: Members
  • Posts: 349
  • Joined: 25-October 03
  • Gender:Male
  • Location:I.M.MEEN's book

Posted 10 September 2006 - 05:42 PM

We've had a lot of these lately, and for the most part they can be answered with a single reply, so why not have them all in one place? From now on, post all your questions asking for a specific Robotic command or counter in this thread. More elaborate questions that would likely require multiple replies and a detailed discussion should be posted in the forum as per usual.

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
SmilyMZX, A.K.A. Hamtaro126 (A.K.A. AtariHacker)

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!)
0

#2 User is offline   Val 

  • ring ring zap
  • PipPipPipPipPip
  • Group: Members
  • Posts: 2,233
  • Joined: 19-February 04
  • Gender:Female
  • Location:Bartholomew

Posted 10 September 2006 - 05:46 PM

volume #

0

#3 User is offline   smilymzx 

  • Those Goodie-Goodies!
  • PipPipPip
  • Group: Members
  • Posts: 349
  • Joined: 25-October 03
  • Gender:Male
  • Location:I.M.MEEN's book

Posted 10 September 2006 - 06:09 PM

Thank you for looking for it! Sure, It is a bad question. but i had to ask!
SmilyMZX, A.K.A. Hamtaro126 (A.K.A. AtariHacker)

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!)
0

#4 User is offline   hob nado 

  • Ancient Member
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 4,718
  • Joined: 23-September 00
  • Gender:Male

Posted 11 September 2006 - 01:26 AM

Please try to read the help file just a bit more carefully next time; the VOLUME command is indeed listed...
0

#5 User is offline   Terryn 

  • ******
  • Group: DigiStaff
  • Posts: 2,961
  • Joined: 12-October 00
  • Gender:Male

Posted 11 September 2006 - 01:47 AM

Oddly enough, though, it's not grouped with the other sound-related commands in the sound section. Both GJ and I must have missed that. That will be fixed for 2.81d's help file.
angelic stream - shed sanguine - ill-adapt - avis - para/lyser - renaissance - dead tangent - phosphene blur - birth breeds death - ________ - painted glass - lagniappe

<Exophase> HES STEALING MAH AIRSHIP!!!!!!11111111
0

#6 User is offline   Pancake 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 963
  • Joined: 21-April 06
  • Gender:Not Telling
  • Location:United States

Posted 16 September 2006 - 12:38 AM

what's that counter or command or whatever for pressing the enter key? i really need to know for a top secret project i'm doing.

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

0

#7 User is offline   Terryn 

  • ******
  • Group: DigiStaff
  • Posts: 2,961
  • Joined: 12-October 00
  • Gender:Male

Posted 16 September 2006 - 01:07 AM

1) It's a label called "keyenter".

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.
angelic stream - shed sanguine - ill-adapt - avis - para/lyser - renaissance - dead tangent - phosphene blur - birth breeds death - ________ - painted glass - lagniappe

<Exophase> HES STEALING MAH AIRSHIP!!!!!!11111111
0

#8 User is offline   Spectere 

  • Resident Spectere Fanboy
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 3,111
  • Joined: 18-June 04
  • Gender:Male
  • Location:Struthers, OH, USA

Posted 17 September 2006 - 08:59 AM

Terryn, on Sep 15 2006, 08:07 PM, said:

2) In 2.81c, you don't need any activation. It's in already.

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.
:)
0

#9 User is offline   Terryn 

  • ******
  • Group: DigiStaff
  • Posts: 2,961
  • Joined: 12-October 00
  • Gender:Male

Posted 17 September 2006 - 09:20 AM

Yeah, that seems like the more obvious interpretation. Oh well. Whichever one it is, it's covered. I was assuming he had antiquated info about how to activate the cheat mode (since it required a -? command line option before).
angelic stream - shed sanguine - ill-adapt - avis - para/lyser - renaissance - dead tangent - phosphene blur - birth breeds death - ________ - painted glass - lagniappe

<Exophase> HES STEALING MAH AIRSHIP!!!!!!11111111
0

#10 User is offline   T-Bone 

  • Wastelander
  • PipPipPipPipPip
  • Group: Members
  • Posts: 2,487
  • Joined: 16-August 02
  • Gender:Male
  • Location:Canada

Posted 27 September 2006 - 06:52 PM

Terryn, on Sep 10 2006, 08:47 PM, said:

Oddly enough, though, it's not grouped with the other sound-related commands in the sound section. Both GJ and I must have missed that. That will be fixed for 2.81d's help file.

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?
0

#11 User is offline   Skylark 

  • AFK
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,823
  • Joined: 29-July 03
  • Gender:Male

Posted 27 September 2006 - 10:50 PM

You can only internally change the volume of the mod playing via a robot.. Personally I think a good addition would be a volume parameter for the "sam" command, rather than a frequency parameter (since we're all using 8-bit wavs now).
0

#12 User is offline   T-Bone 

  • Wastelander
  • PipPipPipPipPip
  • Group: Members
  • Posts: 2,487
  • Joined: 16-August 02
  • Gender:Male
  • Location:Canada

Posted 28 September 2006 - 09:34 AM

That's exactly what i was hoping it would turn into. But changing something like that in a command would create so many incompatibility issues. Perhaps if we could have a new command ;) (OR counter)
0

#13 User is offline   Koji 

  • End
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 6,644
  • Joined: 15-November 01
  • Gender:Not Telling
  • Location:US, NC

Posted 28 September 2006 - 10:13 AM

Nah that's not true, you just use the version strings as an activator for the newer version of the interpretation.

IOW, if the version string is before whatever mzx this change will be added, the volume affecting part of interpretation code will be skipped.
0

#14 User is offline   savagegreywolf 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 20
  • Joined: 15-September 06

Posted 28 September 2006 - 04:02 PM

Spectere, on Sep 17 2006, 08:59 AM, said:

I think he might be referring to the key codes that F7 and F8 return, for cheat detection purposes. 65/288

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?
0

#15 User is offline   T-Bone 

  • Wastelander
  • PipPipPipPipPip
  • Group: Members
  • Posts: 2,487
  • Joined: 16-August 02
  • Gender:Male
  • Location:Canada

Posted 28 September 2006 - 10:33 PM

Koji, on Sep 28 2006, 05:13 AM, said:

Nah that's not true, you just use the version strings as an activator for the newer version of the interpretation.

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!
0

#16 User is offline   Terryn 

  • ******
  • Group: DigiStaff
  • Posts: 2,961
  • Joined: 12-October 00
  • Gender:Male

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:

I think he might be referring to the key codes that F7 and F8 return, for cheat detection purposes. 65/288

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.
angelic stream - shed sanguine - ill-adapt - avis - para/lyser - renaissance - dead tangent - phosphene blur - birth breeds death - ________ - painted glass - lagniappe

<Exophase> HES STEALING MAH AIRSHIP!!!!!!11111111
0

#17 User is offline   NoahSoft 

  • DMZX Fo' Life
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,585
  • Joined: 14-May 01
  • Location:Canada

Posted 29 September 2006 - 03:42 PM

Is there a command that checks if there's anything on a board a opposed to a xy coordinate?

;)
<=D I AM A ROCKER. I ROCK OUT.<=D
0

#18 User is offline   Terryn 

  • ******
  • Group: DigiStaff
  • Posts: 2,961
  • Joined: 12-October 00
  • Gender:Male

Posted 29 September 2006 - 08:02 PM

IF ANY [color] [thing] [param] "label"

and its converse
IF NO [color] [thing] [param] "label"

angelic stream - shed sanguine - ill-adapt - avis - para/lyser - renaissance - dead tangent - phosphene blur - birth breeds death - ________ - painted glass - lagniappe

<Exophase> HES STEALING MAH AIRSHIP!!!!!!11111111
0

#19 User is offline   NoahSoft 

  • DMZX Fo' Life
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,585
  • Joined: 14-May 01
  • Location:Canada

Posted 30 September 2006 - 06:39 AM

ooo thanks terryn!

;)
<=D I AM A ROCKER. I ROCK OUT.<=D
0

#20 User is offline   savagegreywolf 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 20
  • Joined: 15-September 06

Posted 06 October 2006 - 07:28 PM

Terryn, on Sep 28 2006, 11:48 PM, said:

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.

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...
0

#21 User is offline   Skylark 

  • AFK
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,823
  • Joined: 29-July 03
  • Gender:Male

Posted 12 October 2006 - 02:06 AM

Just assume that people can't press F7/F8, because people who are actually playing a game don't cheat. It doesn't particularly matter anyway; if people want to ruin your game by bypassing most of it with F7/F8, they're the ones that are missing out. Cheating in a game isn't any satisfaction (for me, at least), because the fun of a game is to play it, not to get to the end (even though getting to the end of a particularly difficult game under your own steam is quite a satisfying experience ^^)
0

#22 User is offline   Koji 

  • End
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 6,644
  • Joined: 15-November 01
  • Gender:Not Telling
  • Location:US, NC

Posted 12 October 2006 - 04:02 PM

I think savage really wants something added like entermenu to deactivate the possibility of cheats.

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.
0

#23 User is offline   Dr Lancer-X 

  • 電波、届いた?
  • Group: DigiStaff
  • Posts: 8,938
  • Joined: 20-March 02
  • Location:ur mom nmiaow

Posted 12 October 2006 - 08:46 PM

... *sigh*

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
Posted Image
<Malwyn> Yes, yes. Don't worry I'd rather masturbate with broken glass than ask you for help again. :(
0

#24 User is offline   Koji 

  • End
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 6,644
  • Joined: 15-November 01
  • Gender:Not Telling
  • Location:US, NC

Posted 12 October 2006 - 10:25 PM

Good point. I forgot about that. MOOT'D
0

#25 User is offline   savagegreywolf 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 20
  • Joined: 15-September 06

Posted 17 October 2006 - 06:01 PM

Well it's just that, part of the plot of my game revolves about the ability that once you get a certain item you get 1 extra life, which sends you to a different board when you die (kinda stole the idea from JDewbre, but hey) so dying is part of the storyline.

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

0

#26 User is offline   Skylark 

  • AFK
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,823
  • Joined: 29-July 03
  • Gender:Male

Posted 17 October 2006 - 11:21 PM

I'm afraid you'll just have to wait for the new version; and just assume that people will play your game without cheating. If people are going to cheat in the editor, the can just change boards you know -_-
0

#27 User is offline   Dr Lancer-X 

  • 電波、届いた?
  • Group: DigiStaff
  • Posts: 8,938
  • Joined: 20-March 02
  • Location:ur mom nmiaow

Posted 17 October 2006 - 11:23 PM

And they can remove your cheat protection too.
Posted Image
<Malwyn> Yes, yes. Don't worry I'd rather masturbate with broken glass than ask you for help again. :(
0

#28 User is offline   Koji 

  • End
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 6,644
  • Joined: 15-November 01
  • Gender:Not Telling
  • Location:US, NC

Posted 18 October 2006 - 09:19 PM

Just make the game and releases it cheat prevention in mzx is like analogue buttons... USELESS. D:<
0

#29 User is offline   RyanThunder 

  • Old-fashioned MZXer.
  • PipPipPipPip
  • Group: Members
  • Posts: 508
  • Joined: 09-November 02
  • Gender:Male

Posted 21 November 2006 - 12:08 AM

Hello fellow MZXers.

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...
0

#30 User is offline   Dr Lancer-X 

  • 電波、届いた?
  • Group: DigiStaff
  • Posts: 8,938
  • Joined: 20-March 02
  • Location:ur mom nmiaow

Posted 21 November 2006 - 12:17 AM

change c?? bullet p?? c07 space p00
Posted Image
<Malwyn> Yes, yes. Don't worry I'd rather masturbate with broken glass than ask you for help again. :(
0

Share this topic:


  • (8 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users