dMZX Forums: New Game - dMZX Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

New Game

#1 User is offline   zjm 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 9
  • Joined: 07-February 08

Posted 07 February 2008 - 02:30 AM

Well, I'm going to start creating a game, but there are questions which need to be answered. I'm new to the boards, but not to MegaZeux. I use 2.81h, and am an okay programmer.

First Question:

If I want to have an enemy that can be injured, how can I make that into a subroutine, so it won't restart an attack program?

Furthermore, does anyone have any good programs for enemies?
Teacher -"Can you tell me anything about the solar system, Billy?
Billy - "THE BIG YELLOW ONE IN THE MIDDLE IS THE SUN!
Teacher - "Can you tell me anything about the other planets?"
Billy - "THE BIG YELLOW ONE IN THE MIDDLE IS THE SUN!
Teacher - "Calm down, Billy."
Billy - "THE BIG... YELLOW... ONE IN THE MIDDLE... IT'S THE SUN!"
0

#2 User is offline   LogiCow 

  • Holiday cow
  • PipPipPipPipPip
  • Group: Members
  • Posts: 2,671
  • Joined: 18-July 02
  • Gender:Male
  • Location:Quebec

Posted 07 February 2008 - 03:03 AM

You can use subroutines, as long as you use a custom player weapon instead of default bullets.

: "justentered"
set "local" to "enemies"
inc "enemies" by 1
set "enemy&local&_hitpoints" to 3
goto "main"

[...]

: "#shot"
dec "enemy&local&_hitpoints" by 1
if "enemy&local&_hitpoints" > 0 then "#return"
goto "eleminated"


If that seems too complicated to you, you can use "local" as your hit points counter and use:

: "#shot"
dec "local" by 1
if "local" > 0 then "#return"
explode 0
0

#3 User is offline   zjm 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 9
  • Joined: 07-February 08

Posted 07 February 2008 - 03:06 AM

Excellent! Thank you very much. Could you explain how to create a custom weapon? I haven't explored that area of programming.
Teacher -"Can you tell me anything about the solar system, Billy?
Billy - "THE BIG YELLOW ONE IN THE MIDDLE IS THE SUN!
Teacher - "Can you tell me anything about the other planets?"
Billy - "THE BIG YELLOW ONE IN THE MIDDLE IS THE SUN!
Teacher - "Calm down, Billy."
Billy - "THE BIG... YELLOW... ONE IN THE MIDDLE... IT'S THE SUN!"
0

#4 User is offline   zjm 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 9
  • Joined: 07-February 08

Posted 08 February 2008 - 12:50 AM

I figured out how to make a custom weapon, and created a sword program, but I'm not quite sure how to make it a subroutine.
Teacher -"Can you tell me anything about the solar system, Billy?
Billy - "THE BIG YELLOW ONE IN THE MIDDLE IS THE SUN!
Teacher - "Can you tell me anything about the other planets?"
Billy - "THE BIG YELLOW ONE IN THE MIDDLE IS THE SUN!
Teacher - "Calm down, Billy."
Billy - "THE BIG... YELLOW... ONE IN THE MIDDLE... IT'S THE SUN!"
0

#5 User is offline   zjm 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 9
  • Joined: 07-February 08

Posted 08 February 2008 - 04:30 AM

I figured out the subroutine, and am ready to start my game!
Teacher -"Can you tell me anything about the solar system, Billy?
Billy - "THE BIG YELLOW ONE IN THE MIDDLE IS THE SUN!
Teacher - "Can you tell me anything about the other planets?"
Billy - "THE BIG YELLOW ONE IN THE MIDDLE IS THE SUN!
Teacher - "Calm down, Billy."
Billy - "THE BIG... YELLOW... ONE IN THE MIDDLE... IT'S THE SUN!"
0

#6 User is offline   Koji 

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

Posted 08 February 2008 - 04:32 PM

yay game :D
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

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