Charas-Project

  • Home
  • Help
  • Search
  • Calendar
  • Login
  • Register
*
Please login or register.

Login with username, password and session length
 

News:

Click here to join us on IRC (#charas on irc.freenode.net)!



  • Charas-Project »
  • Game Creation »
  • Requests »
  • RPG Maker Programming »
  • Coding trouble
« previous next »
  • Print
Pages: [1]

Author Topic: Coding trouble  (Read 2221 times)

Offline VulcanRaven336

  • Yee!
  • Zealot
  • *
  • Posts: 579
  • I Use Photoshop 7.
Coding trouble
« on: June 14, 2005, 08:02:17 PM »
I have a Vitality meter in my game to where I have a timer going on for 7 min. and 7 sec. when it reaches 1 second, 1 Vitality variable goes down out of 10. then it restarts the timer. everytime a Vitality variable goes down, I have it to where a bar, with energy shows. Each time a Vitality variable goes down, the bar goes down. When the Vitality variable reaches 0, then the character dies.
I also have items that raise your vitality by 1, 2, or three variables depending on the item.

What I wanted to ask was that when the timer reaches one second and the variable goes to 9 variables, the game seems to. . . Slow down dramatically. Any one knows what's the matter with this? I think it's because I have a dash system going on at the same time, but I removed the dash system and the vitality system still slows down after the first variable lost. Can anyone help me?
Logged

Offline WarxePB

  • Action Sue
  • Royal
  • *
  • Posts: 3,601
  • What killed the dinosaurs?
    • The Gigaverse
(No subject)
« Reply #1 on: June 14, 2005, 08:17:20 PM »
Hmm, your description really doesn't make sense (to me, at least), but I think I know what you want, so I'm going to post the code of what it should look like:

(First, create a new variable "Vitality". Set it to 10.)

<>Label: 1
<>Start Timer: 1, 7 min 7 sec
<>Label: 2
<>Branch if Var[0001:Vitality] is 0
|<>Show Picture, 1, vitality-0, (coordinates)
|<>Message: Your vitality is 0...
|<>Game Over
|<>
<>Else Handler
|<>Branch if Var[0001:Vitality] is 1
||<>Show Picture: 1, vitality-1, (coordinates)
||<>
|<>Else Handler
||<>Branch if Var[0001:Vitality] is 2
|||<>Show Picture: 1, vitality-2, (coordinates)
|||<>

(Continue copying the Branch and editing the values until it gets to 10.)

<>Wait: 0.1 sec
<>Branch if Timer 1 is 2 sec or less
|<>Variable Operation: Var[0001:Vitality] -, 1
|<>Jump to Label: 1
|<>
<>Else Handler
|<>Jump to Label: 2

This should work.
Logged
Blog: The Gigaverse
Twitter: Initial Chaos

Offline VulcanRaven336

  • Yee!
  • Zealot
  • *
  • Posts: 579
  • I Use Photoshop 7.
(No subject)
« Reply #2 on: June 14, 2005, 08:43:12 PM »
I did what you said, but still no results. Let me show you.
Logged

  • Print
Pages: [1]
« previous next »
  • Charas-Project »
  • Game Creation »
  • Requests »
  • RPG Maker Programming »
  • Coding trouble
 

  • SMF 2.0.10 | SMF © 2015, Simple Machines
  • XHTML
  • 2O11
  • RSS
  • WAP2
  • Simple Machines Forum