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

Jump to content

  • (8 Pages)
  • +
  • « First
  • 4
  • 5
  • 6
  • 7
  • 8
  • You cannot start a new topic
  • You cannot reply to this topic

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

#151 User is offline   RyanThunder 

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

Posted 15 September 2007 - 05:33 AM

Any alternatives besides having the global robot check with a max lives counter?
0

#152 User is offline   Dr Lancer-X 

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

Posted 15 September 2007 - 10:50 AM

<RyanThunder> How do I do X?
<Terryn> You can't do X.
<RyanThunder> Yeah, but how do I do X?
Posted Image
<Malwyn> Yes, yes. Don't worry I'd rather masturbate with broken glass than ask you for help again. :(
0

#153 User is offline   RyanThunder 

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

Posted 15 September 2007 - 06:39 PM

Nevermind.
0

#154 User is offline   CJA 

  • «≡larch bucket≡»
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 3,263
  • Joined: 23-June 05
  • Gender:Male
  • Location:......@.c....

Posted 15 September 2007 - 10:59 PM

Lancer-X I'm truly disappointed

you have to be on drugs or asleep or something. this just isn't you!

set "maxlives" 7
: "lifechex"
wait 1
if "lives" <= "maxlives" "lifechex"
set "lives" "maxlives"
goto "lifechex"


RyanThunder don't let his grating nuances get all over your vac!

Also, give yourself a cool member title, you can when you have 100 posts.

This post has been edited by CJA: 15 September 2007 - 11:00 PM

Need a dispenser here.
0

#155 User is offline   Dr Lancer-X 

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

Posted 15 September 2007 - 11:01 PM

No, it was the phrasing of the question:
"Any alternatives besides having the global robot check with a max lives counter?"

(i.e. the code you just wrote)
Why does he want an alternative to that? What's wrong with that?

The only alternative would clearly have to be functionality built into MZX--which, as Terryn already said, didn't exist.
Posted Image
<Malwyn> Yes, yes. Don't worry I'd rather masturbate with broken glass than ask you for help again. :(
0

#156 User is offline   CJA 

  • «≡larch bucket≡»
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 3,263
  • Joined: 23-June 05
  • Gender:Male
  • Location:......@.c....

Posted 15 September 2007 - 11:13 PM

The, uh.
Need a dispenser here.
0

#157 User is offline   RyanThunder 

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

Posted 16 September 2007 - 03:39 AM

I was only asking if there was any alternative. But, whatever, it's no big deal. That code'll do just fine.
0

#158 User is offline   FSleeper 

  • Member
  • PipPip
  • Group: Members
  • Posts: 66
  • Joined: 28-September 07
  • Gender:Male
  • Location:The internet

Posted 28 October 2007 - 03:10 PM

What command would tell me when my robot has been shot, then increase a counter by x? Trying to get accuracy into a game I'm making.

Fsleeper has been happy lately. He was comforted by a lovely waterfall lately. He slept without a proper room. He had a pretty wonderful meal lately. He talked with a friend lately. He was nauseated by the sun lately.

He is a citizen of the United States of America
Fsleeper likes Steel, Diamonds, mirocline, the color electric blue, pizza, and Doctor Pepper
He lives life at a leisurely pace. He is not a risk taker. He finds helping others rewarding. He is slow to anger. He has an incredibly calm demeanor. He is a pessimist. He often feels discouraged. He has a profound sense of duty and obligation. He likes to try new things. He enjoys the company of others. He has a fertile imagination. He is entranced by riddles and puzzles and loves to debate. He is disorganized. He rarely completes tasks and is often overcome by distractions. He can handle stress. He very rarely does more work then neccessary. He is not easily moved to pity. He often does the first thing that comes to mind. He needs caffiene to get through the day.
0

#159 User is offline   Lachesis 

  • the pinnacle of human emotion
  • Group: DigiStaff
  • Posts: 3,943
  • Joined: 17-July 04
  • Gender:Female
  • Location:Sealand

Posted 28 October 2007 - 04:10 PM

FSleeper, on Oct 28 2007, 08:10 AM, said:

What command would tell me when my robot has been shot, then increase a counter by x? Trying to get accuracy into a game I'm making.

: "shot"
inc "counter" "x"
* "you shot me, you distinguished black fellow D:>"
end

"Let's just say I'm a GOOD hacker, AND virus maker. I'm sure you wouldn't like to pay for another PC would you?"

xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository
0

#160 User is offline   FSleeper 

  • Member
  • PipPip
  • Group: Members
  • Posts: 66
  • Joined: 28-September 07
  • Gender:Male
  • Location:The internet

Posted 28 October 2007 - 04:30 PM

thanks!

Fsleeper has been happy lately. He was comforted by a lovely waterfall lately. He slept without a proper room. He had a pretty wonderful meal lately. He talked with a friend lately. He was nauseated by the sun lately.

He is a citizen of the United States of America
Fsleeper likes Steel, Diamonds, mirocline, the color electric blue, pizza, and Doctor Pepper
He lives life at a leisurely pace. He is not a risk taker. He finds helping others rewarding. He is slow to anger. He has an incredibly calm demeanor. He is a pessimist. He often feels discouraged. He has a profound sense of duty and obligation. He likes to try new things. He enjoys the company of others. He has a fertile imagination. He is entranced by riddles and puzzles and loves to debate. He is disorganized. He rarely completes tasks and is often overcome by distractions. He can handle stress. He very rarely does more work then neccessary. He is not easily moved to pity. He often does the first thing that comes to mind. He needs caffiene to get through the day.
0

#161 User is offline   Genrok 

  • My name's not really Genrok
  • PipPipPip
  • Group: Members
  • Posts: 269
  • Joined: 25-April 07
  • Gender:Male
  • Location:Here

Posted 04 December 2007 - 02:07 AM

Is there a command or counter or something that will let you change the name of a robot in-game?
"I'm not superstitious, I'm just a little stitious." - Michael Scott
"I'm a victim of circumstance!" - Curly
"I reject your reality and substitute my own." - Adam Savage
"Why don't you cry me a river, build a bridge, and get over it."
"I see you're drinking 1%, is that because you think you're fat?" - Napoleon Dynamite
"War is Groovy" - some violent hippie

I have about 30 unfinished mzx games, and I plan to keep it that way.
0

#162 User is offline   Hoof 

  • "i surpose iritiation bastard covers me also." -Scorch
  • PipPipPip
  • Group: Members
  • Posts: 326
  • Joined: 26-November 05
  • Gender:Male
  • Location:Pittsburgh, PA

Posted 04 December 2007 - 02:27 AM

A line that has ."@robotname" will change the robot's name to "robotname"

it's like a comment line with an @ before the string

This post has been edited by Hoof: 04 December 2007 - 02:28 AM

.hoof.
0

#163 User is offline   Genrok 

  • My name's not really Genrok
  • PipPipPip
  • Group: Members
  • Posts: 269
  • Joined: 25-April 07
  • Gender:Male
  • Location:Here

Posted 04 December 2007 - 02:31 AM

All right. Thanks so much! :)
"I'm not superstitious, I'm just a little stitious." - Michael Scott
"I'm a victim of circumstance!" - Curly
"I reject your reality and substitute my own." - Adam Savage
"Why don't you cry me a river, build a bridge, and get over it."
"I see you're drinking 1%, is that because you think you're fat?" - Napoleon Dynamite
"War is Groovy" - some violent hippie

I have about 30 unfinished mzx games, and I plan to keep it that way.
0

#164 User is offline   MZX Guy 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 19
  • Joined: 30-January 07
  • Gender:Male

Posted 16 February 2008 - 02:08 AM

How do you do the little foot animation from Cans that happens when the player walks?
I was a moose once.
0

#165 User is offline   Lachesis 

  • the pinnacle of human emotion
  • Group: DigiStaff
  • Posts: 3,943
  • Joined: 17-July 04
  • Gender:Female
  • Location:Sealand

Posted 16 February 2008 - 03:18 AM

MZX Guy, on Feb 15 2008, 07:08 PM, said:

How do you do the little foot animation from Cans that happens when the player walks?

: "l"
wait 1
set "frame" to "('frame'+1%4)"
set "pressed" to "('key72'o'key75'o'key77'o'key80')"
goto "frame_&playerfacedir&_('frame'*'pressed')"

:frame_0_0
:frame_0_2
. "facing north, standing frame/walking frame 0 and 2
char edit 'X' x x x x x x x x x x x x x x
goto l
:frame_0_1
. "facing north, walking frame 1 (left foot forward, right foot back)
char edit 'X' x x x x x x x x x x x x x x
goto l
:frame_0_1
. "facing north, walking frame 3 (right foot forward, left foot back)
char edit 'X' x x x x x x x x x x x x x x
goto l

.do the same for the other facedirs :P


May be confusing for a beginner, though.
"Let's just say I'm a GOOD hacker, AND virus maker. I'm sure you wouldn't like to pay for another PC would you?"

xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository
0

#166 User is offline   MZX Guy 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 19
  • Joined: 30-January 07
  • Gender:Male

Posted 29 February 2008 - 08:18 PM

Is there a command to make it to where when the the player touches a robot, it saves the game up to that point?
I was a moose once.
0

#167 User is offline   FuriKuri 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 18
  • Joined: 20-December 05

Posted 29 February 2008 - 09:25 PM

: "TOUCH"
set "(name of file to save to).sav" "save_game"


This will save a file of the game, and you can load it up again with:

set "(name of file saved).sav" "load_game"

This post has been edited by FuriKuri: 29 February 2008 - 09:25 PM

a.k.a. Pent @ IRC

user posted image

Currently working on: Relic

Fire Emblem: Ethereal Guardian (taking a break for now)

Currently working on: AI - how opposing units decide who to attack/where to run <-- need help with
0

#168 User is offline   MZX Guy 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 19
  • Joined: 30-January 07
  • Gender:Male

Posted 29 February 2008 - 10:11 PM

Thank you.
I was a moose once.
0

#169 User is offline   MZX Guy 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 19
  • Joined: 30-January 07
  • Gender:Male

Posted 29 June 2008 - 09:44 PM

What's the coding to play a sound effect when the player shoots?
I was a moose once.
0

#170 User is offline   Terryn 

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

Posted 30 June 2008 - 09:34 AM

Assuming you mean default shooting, it's not a command. You press Alt+F to edit the list of sound effects and edit the line corresponding to "Shoot". To make it play a wav/ogg sound effect at its natural frequency whenever the player shoots, put &SHOOTSOUND.WAV& in the blank (replace SHOOTSOUND.WAV with the name of the file you want to play, naturally).
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

#171 User is offline   MZX Guy 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 19
  • Joined: 30-January 07
  • Gender:Male

Posted 30 June 2008 - 07:10 PM

Terryn, on Jun 30 2008, 03:34 AM, said:

Assuming you mean default shooting, it's not a command. You press Alt+F to edit the list of sound effects and edit the line corresponding to "Shoot". To make it play a wav/ogg sound effect at its natural frequency whenever the player shoots, put &SHOOTSOUND.WAV& in the blank (replace SHOOTSOUND.WAV with the name of the file you want to play, naturally).

How didn't I think of this :p
I was a moose once.
0

#172 User is offline   StarbladeEnkai 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 33
  • Joined: 18-August 07
  • Gender:Male
  • Location:Monterey

Posted 25 August 2008 - 09:24 AM

Is there an easy way to make a sprite directly from the vlayer?

So far I've had to do this:

copy bock #vx #vy w h bx by
set sprn_refx bx
set sprn_refy by
set sprn_width w
set sprn_height h
put c?? Sprite pn posx posy

There's got to be a better way!
0

#173 User is offline   Wervyn 

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

Posted 25 August 2008 - 01:10 PM

There is. The command you're searching for is "set "spr#_vlayer" to 1". An oversight in the development means that there's not a similar way to link the sprite from the overlay, and it's still never been added. But this should be enough for your purposes.

"Ogres are not like parfaits. Ogres are like onions."
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

#174 User is offline   StarbladeEnkai 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 33
  • Joined: 18-August 07
  • Gender:Male
  • Location:Monterey

Posted 01 September 2008 - 08:46 PM

How do I turn a sprite that's been turned off back on?
0

#175 User is offline   Wervyn 

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

Posted 01 September 2008 - 09:05 PM

You just put it somewhere again. The values for the sprite counters don't change when you turn it off, it just doesn't appear on the board or collide with anything. So, put c?? Sprite "spritenum" at "x" "y".

"And it also makes a great paperweight."
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

#176 User is offline   Scarmiglione Malebolge 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 15
  • Joined: 24-November 08

Posted 26 November 2008 - 06:13 PM

Hello. I'd like to put a sprite in SMZX, but it changes all the ref chars when I put it in. I want ... all the char 32's ... OUT -- not out of the collision box -- I don't want to see them at all.
0

#177 User is offline   T-Bone 

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

Posted 26 November 2008 - 09:41 PM

A sprite that's already been designed in the normal standard MZX mode?
Youtube - teabone3 - Twitter - teabone3 - Twitch - teabone3
0

#178 User is offline   Koji 

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

Posted 30 November 2008 - 05:46 AM

Scarmiglione,

char 32 which are the space character are always ignored when copying the sprite graphic from the reference location to the destination, if you modify the reference location the sprite graphic will be altered. I don't know enough about your problem to be of any more help.

As for doing this in SMZX those rules are the same, however making graphics in SMZX is a bit more involved than normal mzx graphics... I suggest you first practice working with sprites and SMZX independently at first.
0

#179 User is offline   Great Knight 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 15
  • Joined: 06-October 08
  • Gender:Male

Posted 08 January 2009 - 11:10 AM

Hi everyone, how do you make copies of a Robot and then place them at a certain location? For example, let's say I have created a Robot called Demon that launches Robots called Fireball. If I want the Demon to launch the Fireball I'd copy the Fireball in front of the Demon, and then send a message to Fireball to get it to move away from Demon (and towards the player). Thing is, I don't know the best command to do this. As I know it, the required command is not...

...copyrobot. Because it simply turns Robot A into Robot B. I don't want that.
...duplicate self. I don't want another copy of Demon. I want a copy of Fireball.
...copy # # # #. Well, actually, this works for me, but the Megazeux manual said this is not recommended since it slows down the game.

I've looked at Nytar's Demon Earth game and found that projectile Robots are created using copyrobot, which leaves me scratching my head. I'm afraid I'm stuck. What command should I use?

Great Knight
0

#180 User is offline   Pyro1588 

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

Posted 08 January 2009 - 02:09 PM

here's how to do it with duplicate self:
:demon
(insert all your demon code here)
if blocked east goto "demon"
duplicate self east
send east "fireballeast"
wait 1
goto "demon"
:fireballeast
walk east


that's a simple example, but the basic gist is that the robot has both the demon code and the fireball code. when you want it to fire, make sure that it's not blocked and then duplicate the robot in that direction. then you just send the newly-created duplicate to the fireball label. have one fireball label for each direction and there you have it.

make sense?
<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

Share this topic:


  • (8 Pages)
  • +
  • « First
  • 4
  • 5
  • 6
  • 7
  • 8
  • You cannot start a new topic
  • You cannot reply to this topic

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