Charas-Project

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

Login with username, password and session length
 

News:

New forum theme up and running!



  • Charas-Project »
  • Game Creation »
  • Requests »
  • RPG Maker Programming »
  • Something wrong with the code?
« previous next »
  • Print
Pages: [1]

Author Topic: Something wrong with the code?  (Read 2484 times)

Offline TGF

  • fffff I'M BACK
  • Associate
  • *
  • Posts: 104
  • Lazerrr....
Something wrong with the code?
« on: February 24, 2009, 11:49:56 PM »
So in my Zelda game I'm working on, I made the basic enemy: an Octorok.
However, whenever Link touches the Octorok, he just stands there until I hit Enter, which causes damage to me and the octorok.
The whole thing is just being wierd.

Maybe you guys could check out this code to see where I went wrong:


Any help appreciated.
Logged


Quote from: Dragonium
You are already dead.

Offline Prpl_Mage

  • Administrator
  • Sage
  • *
  • Posts: 7,645
  • The Administrator Mage
    • Check out our itch website
Re: Something wrong with the code?
« Reply #1 on: February 25, 2009, 08:59:41 AM »
Sploosh

edit: oh forgot to add text.

So.
Having a conditional branch with the "Event was started using the action key." Is a solid version of your key input thing.What you've done is this:
Hero collide with monster - the "Key input processing" waits for you to press the assigned button (nr 5, decision key/action key).
After pressing it, the rest just goes.

Having an event having the "Event was started using the action key" will make it like this:
Hero collide with monster - the action key was NOT pressed. the else handler is used : hero is hurt.
Hero press action button when enemy is in front of hero. - Hero attacks monster. the condition is fulfilled so the else handler does NOT play.

I hope you understood what I meant.

Edit2: as for the screenshot: I had different weapons for different effects. So you don't see the part where the hero gets damage.
The only important part is the first line.
« Last Edit: February 25, 2009, 09:06:37 AM by Prpl_Mage »
Logged
Cool RPGM Project!
Sprite till you die

Oh my god, this was ...10 years ago...

Offline TGF

  • fffff I'M BACK
  • Associate
  • *
  • Posts: 104
  • Lazerrr....
Re: Something wrong with the code?
« Reply #2 on: February 25, 2009, 10:08:25 PM »
Thankee mate, 'tis working now.



P.S. You kill poor little kitties?
Logged


Quote from: Dragonium
You are already dead.

Offline Prpl_Mage

  • Administrator
  • Sage
  • *
  • Posts: 7,645
  • The Administrator Mage
    • Check out our itch website
Re: Something wrong with the code?
« Reply #3 on: February 26, 2009, 08:05:57 AM »
Quote from: TGF on February 25, 2009, 10:08:25 PM
Thankee mate, 'tis working now.



P.S. You kill poor little kitties?

Kittens be the scourge while riding a boat with mad cows and berserker horses.
Logged
Cool RPGM Project!
Sprite till you die

Oh my god, this was ...10 years ago...

  • Print
Pages: [1]
« previous next »
  • Charas-Project »
  • Game Creation »
  • Requests »
  • RPG Maker Programming »
  • Something wrong with the code?
 

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