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

Jump to content

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

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

#31 User is offline   RyanThunder 

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

Posted 21 November 2006 - 12:20 AM

Yes, that was it!
0

#32 User is offline   cwags55 

  • Member
  • PipPip
  • Group: Members
  • Posts: 56
  • Joined: 14-October 00

Posted 08 December 2006 - 07:06 PM

There's a thread for things like this. Moving it there.

Alright 2 questions down, 375 to go.


With current versions of MZX, is there a way to make your own actual in game save files. As opposed to 'SAVE STATE'?

In other words rather than pressing 'F?' is there a way I could bring up a graphic that could say Do you want to save? and if you choose yes it will save it and you could quit the game and come back to it?
cwags55
Uniquesoft
0

#33 User is offline   Goshi 

  • I'm dreadful of DRAGON.
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 4,146
  • Joined: 23-April 01
  • Gender:Male
  • Location:Hihoukan

Posted 08 December 2006 - 07:24 PM

MZX can load and save files using robotic now. You can play Jello for example on the ave file system. Anyway the commands are...

set "example.sav" to "save_game"
set "example.sav" to "load_game"
0

#34 User is offline   Terryn 

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

Posted 08 December 2006 - 09:16 PM

If that doesn't work for you (there are a few reasons this possibly couldn't, such as showing a small smattering of stats of the saved games in your save/load menus) you can jury-rig up your own custom savefiles and game loading system with file access functions.
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

#35 User is offline   Risu2112 

  • I can't get the top off this bottle
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,864
  • Joined: 12-August 01
  • Gender:Male

Posted 08 December 2006 - 11:11 PM

Be careful, initializing a loaded game from a custom save screen can be a pain in the ass, The trick is to prompt to save, but not actually save until you've returned the save menu board back to the state you want it to be at when the game is later saved. A "justloaded" label similar to "justentered" would be really convenient here, but we don't have one of those ^^.

The save menu I rigged up for SFmzx uses a console rpg style save slot system, it looks really pretty but it was annoying as fuck to code and test what with the multiple statistical and graphical bits of info that are displayed pre loading. Even with a more simple engine though be VERY through on your testing, a critical bug in a custom save game system compounds any other serious bugs found in the game by removing the players ability to reload and circumvent an error, this would likely make your game unplayable and very frustrating. Good luck ^^

This post has been edited by KenOhki2112: 08 December 2006 - 11:15 PM

Respond! Vibrate! Feed back! Resonate!
<Cybersilver> "All my sugestions are for FUTER VERSIONS. Say it with me Fu-ter futer. Yep..."
9-21-2009, SFMZX game play video: HERE
Risu2112
0

#36 User is offline   Terryn 

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

Posted 08 December 2006 - 11:15 PM

KenOhki2112, on Dec 8 2006, 05:11 PM, said:

Be careful, intializing a loaded game from a custom save screen can be a pain in the ass, The trick is to prompt to save, but not actualy save until you've returned the save menu board back to the state you want it to be at when the game is later saved. a "justloaded" label similar to "justentered" would be really convienent here, but we don't have one of those ^^.

What are you talking about, there's explicitly a label called "justloaded" =(
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

#37 User is offline   hob nado 

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

Posted 08 December 2006 - 11:16 PM

Yeah, that's been in there for years. =)
0

#38 User is offline   Risu2112 

  • I can't get the top off this bottle
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,864
  • Joined: 12-August 01
  • Gender:Male

Posted 08 December 2006 - 11:16 PM

What.. no there isn't.

what?

Edit: oh god so many wasted hours :<

This post has been edited by KenOhki2112: 08 December 2006 - 11:19 PM

Respond! Vibrate! Feed back! Resonate!
<Cybersilver> "All my sugestions are for FUTER VERSIONS. Say it with me Fu-ter futer. Yep..."
9-21-2009, SFMZX game play video: HERE
Risu2112
0

#39 User is offline   cwags55 

  • Member
  • PipPip
  • Group: Members
  • Posts: 56
  • Joined: 14-October 00

Posted 09 December 2006 - 09:27 PM

This is an incredibly simple code that I have forgotten, but....

I can't remember how to change the color of the built in text.

So

* c03 "blah blah blah"

I want it to display at the bottom of the screen as well.

Sorry guys....
cwags55
Uniquesoft
0

#40 User is offline   RoSS 

  • RIP Fred Friedberg 2004
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 3,283
  • Joined: 22-October 00
  • Gender:Male
  • Location:Right in front of behind you.

Post icon  Posted 09 December 2006 - 10:20 PM

* "~3This is text"

message row # (sets the row on which * text appears)
set mesg column # (sets the column on which * text appears)
-RoSS
<img src="http://ross.box43.net/sig.php/sig.png" border="0" class="linked-sig-image" />
0

#41 User is offline   cwags55 

  • Member
  • PipPip
  • Group: Members
  • Posts: 56
  • Joined: 14-October 00

Posted 09 December 2006 - 11:22 PM

Thats right. Geez, I have forgotten so much. Thanks Ross.
cwags55
Uniquesoft
0

#42 User is offline   Dr Lancer-X 

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

Posted 10 December 2006 - 12:15 AM

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

#43 User is offline   cwags55 

  • Member
  • PipPip
  • Group: Members
  • Posts: 56
  • Joined: 14-October 00

Posted 15 December 2006 - 07:17 PM

Is there a built in variable that stores the player coordinates?

i.e.

player_x = ?
player_y= ?

something like that?
cwags55
Uniquesoft
0

#44 User is offline   Wervyn 

  • I can see you
  • Group: DigiStaff
  • Posts: 1,855
  • Joined: 24-December 00
  • Gender:Male
  • Location:Caras Galadhon

Posted 15 December 2006 - 07:30 PM

Yes. Shockingly enough they're called "playerx" and "playery". Now before the latest release, you could be forgiven not knowing this, as they were mysteriously absent from the helpfile. But they're there now, so you know, a lot of these questions really could be answered by doing a little reading into the ingame help, which is nicely divided into useful categories to make things like this easy to find. It can't be that hard to press F1, go to the Robotic Reference Manual, page down to "Counters, Built-In Counters and Local Counters", then see "Player Counters", and discover that oh yes, there are built-in counters that provide the player's coordinates. Seriously, you should try getting used to looking stuff up in the manual, you'll become better faster, and learn how to find information when you forget it. I mean, I program with MZX so little these days, I rarely remember things like sprite minutae off the top of my head. But you too can be an expert on the subject with just a few quick keypresses!

"Oh, and RTFM!"
To lie is to change the truth.
..Ignorance is to be unaware of the truth.
....Incompetence is to be unable to grasp the truth.
......And escape is to run away from the truth.
It is useless to run, since the truth is right next to you.

-Wervyn
0

#45 User is offline   T-Bone 

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

Posted 15 December 2006 - 11:41 PM

Is there a way to make the "WAIT PLAY" command work for sound effects? I asked this question in a topic i created but i guess i should talk about it here since its the WAIT PLAY command im really interested in. Hardly anyone uses those built-in sounds and more so why can't we use wait play for sams, oggs, wavs and such?

http://www.digitalmz...showtopic=11442

This post has been edited by T-bone6: 16 December 2006 - 12:08 AM

0

#46 User is offline   Terryn 

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

Posted 15 December 2006 - 11:45 PM

Just tested it, it can enqueue any TYPE of sound effect but only PC speaker effects can create queueing. Good suggestion.

EDIT: Retest, removed somewhat erroneous stuff previously here.
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

#47 User is offline   T-Bone 

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

Posted 16 December 2006 - 12:08 AM

I think this would be an amazing feature to add to the next version of MegaZeux.

This post has been edited by T-bone6: 16 December 2006 - 12:27 AM

0

#48 User is offline   RyanThunder 

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

Posted 24 December 2006 - 02:30 AM

Alright, two questions:

1. What is the key to take a screenshot in MZX, and where does it save them?

2. I am making a "locked questionnaire" of sorts, meaning that the player has to answer some questions before they can play the game. After they get them all right, I want the questionnaire to "die", then save the ".mzx" file so that it never pops up again. Wasn't there some kind of "SAVE_WORLD" command?
0

#49 User is offline   Goshi 

  • I'm dreadful of DRAGON.
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 4,146
  • Joined: 23-April 01
  • Gender:Male
  • Location:Hihoukan

Posted 24 December 2006 - 02:44 AM

F12

set "example.mzx" to "save_game"

Or something like that. I forogt.

This post has been edited by Goshi: 24 December 2006 - 02:45 AM

0

#50 User is offline   RoSS 

  • RIP Fred Friedberg 2004
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 3,283
  • Joined: 22-October 00
  • Gender:Male
  • Location:Right in front of behind you.

Post icon  Posted 24 December 2006 - 03:01 AM

Your better bet is just to output to a file the data. Upon loading the world, just check to see whether the file exists or not, and then if it does, it's just a couple lines of reading!

EDIT: the advantage of this method is that you only have to delete the data file when you want to clear the questionaire information, not the entire world.
-RoSS
<img src="http://ross.box43.net/sig.php/sig.png" border="0" class="linked-sig-image" />
0

#51 User is offline   Xx*SaturnineMatthias*xX 

  • Your mother.
  • PipPipPipPip
  • Group: Members
  • Posts: 799
  • Joined: 07-November 06
  • Gender:Male
  • Location:Knaresborough, UK

Posted 24 December 2006 - 03:02 AM

RyanThunder, on Dec 24 2006, 02:30 AM, said:

2. I am making a "locked questionnaire" of sorts, meaning that the player has to answer some questions before they can play the game. After they get them all right, I want the questionnaire to "die", then save the ".mzx" file so that it never pops up again. Wasn't there some kind of "SAVE_WORLD" command?

set "example.mzx" "save_world"
this is a signature
0

#52 User is offline   RyanThunder 

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

Posted 24 December 2006 - 08:08 PM

RoSS, on Dec 23 2006, 11:01 PM, said:

Your better bet is just to output to a file the data. Upon loading the world, just check to see whether the file exists or not, and then if it does, it's just a couple lines of reading!

EDIT: the advantage of this method is that you only have to delete the data file when you want to clear the questionaire information, not the entire world.

Would you mind showing me how to do this?
0

#53 User is offline   RoSS 

  • RIP Fred Friedberg 2004
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 3,283
  • Joined: 22-October 00
  • Gender:Male
  • Location:Right in front of behind you.

Post icon  Posted 25 December 2006 - 12:35 AM

It would go something like this

: "justloaded"
set "question.txt" "FREAD_OPEN"
set "$string" "FREAD"
set "" "FREAD_OPEN"
if "$string" != "FREAD" "fileexists"

. "File doesn't exist. Do questionaire."
. "..."

. "The following writes the questionaire to the file:"
set "question.txt" "FWRITE_OPEN"
set "FWRITE_COUNTER" "question1answer"
set "FWRITE_COUNTER" "question2answer"
set "FWRITE_COUNTER" "question3answer"
. "..."
set "" "FWRITE_OPEN"

: "fileexists"
set "question.txt" "FREAD_OPEN"
set "question1answer" "FREAD_COUNTER"
set "question2answer" "FREAD_COUNTER"
set "question3answer" "FREAD_COUNTER"
. "..."
set "" "FREAD_OPEN"

where question1answer (etc) are the counters you're using for the answer to the first question of the questionaire, etc.
It might look pretty complicated but it's pretty simple when you actually try to break it down.

We start by trying to open the file. We then try to read from it. If the file doesn't exist, it'll put the word "FREAD" in $string instead of the value of FREAD. Trying to open a blank-named file essentially closes the file for writing or reading from the beginning again.
If the file is shown not to exist, it goes through the questionaire, and writes the counters obtained one at a time into the file. Reading works similarly.

I think this should work, but I haven't tested it and I don't honestly use file IO (or robotic... =/) that much these days, so there might be a small semantic error somewhere, but that's the general idea.
-RoSS
<img src="http://ross.box43.net/sig.php/sig.png" border="0" class="linked-sig-image" />
0

#54 User is offline   cwags55 

  • Member
  • PipPip
  • Group: Members
  • Posts: 56
  • Joined: 14-October 00

Posted 27 December 2006 - 09:31 PM

In the recent versions of MZX is there a way to read an overlay? Or is it as simple as somthing like:

If c?? overlay p?? x y "go"

cwags55
Uniquesoft
0

#55 User is offline   Xx*SaturnineMatthias*xX 

  • Your mother.
  • PipPipPipPip
  • Group: Members
  • Posts: 799
  • Joined: 07-November 06
  • Gender:Male
  • Location:Knaresborough, UK

Posted 27 December 2006 - 09:56 PM

cwags55, on Dec 27 2006, 09:31 PM, said:

In the recent versions of MZX is there a way to read an overlay?  Or is it as simple as somthing like:

If c?? overlay p?? x y "go"

I don't believe there is, but what you can do is set "overlay_x" and "overlay_y" to the x and y you want to reference from, and the colour and char at that point on the overlay will appear in the counters "overlay_color" and "overlay_char".
this is a signature
0

#56 User is offline   T-Bone 

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

Posted 28 December 2006 - 08:20 AM

Since the command:

Quote

If c?? overlay p?? x y "go"

Does NOT exist, use something like this:

Quote

set "overlay_x" to x
set "overlay_y" to y

if "(('overlay_color'= COLOR) a ('overlay_char'= CHAR))" = 1 then "go"


If you don't understand that - here's some more details:

Say you have a happy face (character #002) and he's white (color #015) at the location 3x 5y:

Quote

set "overlay_x" to 3
set "overlay_y" to 5

if "(('overlay_color'= 15) a ('overlay_char'= 2))" = 1 then "go"


"15" = color #015

"2" = char #002

"=1" just means "if true then go to label 'go'

If you want to check if that happy face is NOT there just change the 1 to a zero.

This post has been edited by T-bone6: 28 December 2006 - 08:24 AM

0

#57 User is offline   T-Bone 

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

Posted 28 December 2006 - 08:45 AM

Here's my question for everyone or anyone that knows the answer; how can i make this work with the vlayer:

Quote

set "vch&thisx&,&thisy&" to 2
set "vco&thisx&,&thisy&" to 31

This post has been edited by T-bone6: 28 December 2006 - 08:46 AM

0

#58 User is offline   T-Bone 

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

Posted 03 January 2007 - 06:51 AM

It be really helpful if that is indeed possible.
0

#59 User is offline   Pyro1588 

  • wojtek
  • PipPip
  • Group: Members
  • Posts: 145
  • Joined: 20-October 02
  • Gender:Male
  • Location:Minnesota

Posted 03 January 2007 - 02:36 PM

that looks like it should work. are you sure you don't have another robot overwriting it or something?
<Tox> bah. I may as well give in and shop australia. D:
<pyro1588> "welcome to australia, can i help you find what you're looking for?"
<Tox> pyro1588, I'm giving you the most reproachful of glares right now.
--------
Go show those nutty Koreans what us crazy Europeans are made of pirate.gif pirate.gif pirate.gif - Saike
<exophase> The old Commodore strategy of, "Go friggin' bankrupt!"
<wervyn> Go away! I'm writing the same engine I always do!
0

#60 User is offline   T-Bone 

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

Posted 04 January 2007 - 09:50 AM

seems like its not working since I'm getting no proper returned values either when i true to read the counters after attempting this. hmmmm
0

Share this topic:


  • (8 Pages)
  • +
  • 1
  • 2
  • 3
  • 4
  • 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